Yoko

All sides of Injection
It is currently 2024-03-29 03:55:53

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2009-03-21 15:14:32 
Offline

Joined: 2006-05-04 18:40:42
Posts: 104
how can pass the parameters to this function from the tab Hotkeys of injection?
Code:
sub cast(spellname,target)
   uo.warmode(0)
   if (haveBandage() && uo.life < uo.str) then
      uo.deletejournal()
      uo.bandageself()
      while (not uo.injournal("Where"))
         wait(10)
      wend
   end if
   uo.cast(spellname,target)
end sub

example:
exec cast("Magic Reflection","self")
inj say me error: "function not found - cast("Magic Reflection","self")

or i must need of another function without parameters with call that method?
example:
Code:
sub bolt()
   cast("Energy Bolt","laststatus")
end sub


i will wont dont create another script with call the main function, well is possible done in hotkeys command? :roll:


Top
   
 Post subject:
PostPosted: 2009-03-21 17:05:01 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
>>i must need of another function without parameters with call that method

Yes, u right.

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2009-03-22 21:18:30 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
currently it isn't possible


Top
   
 Post subject:
PostPosted: 2009-03-22 22:54:36 
Offline

Joined: 2006-05-04 18:40:42
Posts: 104
ok tnx 8)


Top
   
 Post subject: Re:
PostPosted: 2012-01-23 16:44:17 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Yoko wrote:
currently it isn't possible

печаль.


Top
   
PostPosted: 2012-01-23 20:12:07 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Вместо 1 строки 3. Подумаешь... Было бы удобнее но отсутствие не смертельно (как игноры).


ps некрофил :P

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2012-01-23 21:46:57 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Mirage wrote:
Вместо 1 строки 3. Подумаешь... Было бы удобнее но отсутствие не смертельно (как игноры).
ps некрофил :P


Да дело не в том что 1 строка или 3, а в том, что файл для пвп мог бы представлять из себя набор шаблонных функций, которые уже наглядно бы вызывались из хоткеев (каст, выпивание банки, одевание оружий, крафт поушенов, крафт свитков). Имеем 5 функций, с вызовами вида:

Code:
,exec Cast Flame laststatus 0x0123 0x0483
,exec Cast Reflection self 0x0999 0x0888
,exec Cast Mass dispel self 0 0

Где первым параметром имя каста, затем цель, тип скролла и цвет. Вместо этого:
Code:
sub Flame()
  Cast('Flame', 'laststatus', '0x0123', '0x0493')
end sub

sub Reflection()
  Cast('Reflection ', 'self', '0x0123', '0x0493')
end sub

sub MD()
  Cast('Mass dispel', 'self', '0', '0')
end sub

код разрастается до немалых размеров, когда кол-во кастов переваливает за десяток (а ведь там еще крафты и использование банок), и всё из за "подумаешь, 3 строки". Не говоря уже о том, что на десяток-другой написанных таких скриптов, придется ещё такой же десяток действий в самих хоткееях- 'exec Flame' и т.д..
Так что, тут отнюдь не "подумаешь".


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited