Yoko
http://forum.yoko.com.ua/

Error in simple script
http://forum.yoko.com.ua/viewtopic.php?f=3&t=809
Page 1 of 1

Author:  Sauza [ 2004-07-07 21:23:31 ]
Post subject:  Error in simple script

Code:
var mocban="banco"
sub selmocban()
   if (mocban=="banco") then
      uo.exec("setreceivingcontainer banco")
      uo.print(">> Loot al Banco <<")
      uo.print(">> Loot al Banco <<")
      mocban="mochila"
   else
      uo.exec("setreceivingcontainer mochila")
      uo.print(">> Loot ala Mochila <<")
      uo.print(">> Loot ala Mochila <<")
      mocban="banco"
   end if
end sub


Banco and mochila are objects
This script must work as a switch, option 1 container banco, option 2 container mochila
Now it only switch one container an not change to another.

Help Me!
Thank you. =)

Author:  Yoko [ 2004-07-08 10:05:40 ]
Post subject: 

global variables used through command uo.SetGlobal("name","textvalue") and uo.GetGlobal("name")

Author:  Sauza [ 2004-07-08 21:42:16 ]
Post subject: 

Final Script
Thx Yoko :)
Code:
sub selmocban()
   if (uo.GetGlobal("mocban")=="banco") then
      uo.exec("setreceivingcontainer banco")
      uo.print(">> Loot al Banco <<")
      uo.print(">> Loot al Banco <<")
      uo.SetGlobal("mocban","mochila")
   else
   uo.exec("setreceivingcontainer mochila")
      uo.print(">> Loot ala Mochila <<")
      uo.print(">> Loot ala Mochila <<")
      uo.SetGlobal("mocban","banco")
   end if
end sub

Author:  Sauza [ 2004-07-08 22:01:59 ]
Post subject: 

This is wrong???

Code:
sub loot()
uo.exec("load loot.sc")
end sub

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/