Page 1 of 1
Binding key to equipping spell
Posted: August 21st, 2010, 10:04 am
by owenisred
Posted this at the end of an old post, but it died out, so I though I would reiterate here
Is there a way to write a script to BIND a key to equipping a spell?
Thanks,
Owen.
Re: Binding key to equipping spell
Posted: August 21st, 2010, 6:48 pm
by Bigboss
I heard of that somewhere...
Probably but I am terrible at scripts *darn*
Re: Binding key to equipping spell
Posted: August 23rd, 2010, 3:42 am
by owenisred
anyone? please?
Re: Binding key to equipping spell
Posted: August 23rd, 2010, 4:05 am
by Runescapedj
I'm sorry, I think I'm even worse at scripts than Bigboss (I only know a toggle edit and a savemap code)
Re: Binding key to equipping spell
Posted: August 23rd, 2010, 3:00 pm
by PizzaLover101
go on the wiki and search bind keys. You might find it there.
Re: Binding key to equipping spell
Posted: August 24th, 2010, 5:17 am
by owenisred
Thanks! I had a look, I know how to bind a key to an action, but nothing tells me the command for equipping a spell. I have looked through the .cfg files, and I keep seeing things like the Tab key is bound to showplayergui or in master chef ogro's game its something similar, but with I.
I always thought that it needs to define what playergui was in the same .cfg file, for exaple, here is the beginning of the "shop script"
"level_trigger_2" = "showgui Shopkeeper"
newgui Shopkeeper [
guitext "What're ya buyin, stranger?" chat
guibar
guilist [
guibutton "Pie: 10 moneys" [
if ( > $money 9 ) [
money = ( - $money 10 )
pie = ( + $pie 1 )
]
]
You see, it says showgui Shopkeeper and newgui Shopkeeper defines it.
This is why im confused. If I could find the playergui script, I could study it and find out the command to equip a spell. But unfortunately, I cant find that script in any .cfg file The closest I could get was some rpggui.cpp file that I couldnt understand.
EDIT:
if (strcmp (getgame) "rpg") [
bind F1 edittoggle
editbind F1 edittoggle
bind MOUSE1 [ primaryattack ]
bind MOUSE2 [ secondaryattack ]
bind e worlduse
bind TAB [showplayergui (! $showplayergui)]
]
This is what I mean - where is playergui defined