Difference between revisions of "Useful Scripts"

Jump to navigation Jump to search
15 bytes removed ,  16:06, 2 April 2009
→‎Hotkey: Shortened script slightly - see "Toggling a Variable Between Two Values" page
imported>Artisten
(A new FOSE script for hotkey, need a better quest link)
imported>Cipscis
(→‎Hotkey: Shortened script slightly - see "Toggling a Variable Between Two Values" page)
Line 232: Line 232:
Begin GameMode
Begin GameMode
if IsKeyPressed 25 != sToggle
if IsKeyPressed 25 != sToggle
if sToggle == 0 ;Button pressed
set sToggle to sToggle == 0
if sToggle ;Button pressed
;Do things when button 'p' is pressed, in this case, decrease karma
;Do things when button 'p' is pressed, in this case, decrease karma
RewardKarma -650
RewardKarma -650
set sToggle to 1
else ;Button released
else ;Button released
;Do things when button 'p' is released, in this case, increase karma
;Do things when button 'p' is released, in this case, increase karma
RewardKarma 650
RewardKarma 650
set sToggle to 0
endif
endif
endif
endif
End
End
</pre>
</pre>
Anonymous user

Navigation menu