[CD3.55] Help script

smoochy boys on tour

Cayetano

Dedicated Member
Dedicated Member
May 2, 2014
34
2
34
Hello, I am trying to create a special potion so that when you use it, it makes you randomteleport, the problem is if I have 10 in the bag you make 10 times the jump and I just want you to make one.Thanks for the help


[@EventItem_SpecialTeleport]
{
#ACT
SetItemEvent 3 61 @SpecialTeleport




[@SpecialTeleport_Main]
#if
checkitem SpecialTeleport 1
#ACT
take SpecialTeleport 1
break


Mov A1 %USERMAP
Mov A2 %USERx
Mov A3 %USERY
mapmove "%A1,%A2,%A3,100" %username






}
 

Josiko

LOMCN Veteran
Veteran
Loyal Member
Apr 4, 2010
428
8
44
Spain
[@EventItem_SpecialTeleport] { #ACT SetItemEvent 3 61 @SpecialTeleport [@SpecialTeleport_Main] #if checkitem SpecialTeleport 1 #ACT take SpecialTeleport 1 ;break Mov A1 %USERMAP Mov A2 %USERx Mov A3 %USERY mapmove "%A1,%A2,%A3,100" %username break close } If it dont work, can use Check [599] 0 , Set [599] 1 / 0
 
Upvote 0

zedina

Mir3 Dev
Legendary
Dec 22, 2005
3,167
1
1,017
340
Hello, I am trying to create a special potion so that when you use it, it makes you randomteleport, the problem is if I have 10 in the bag you make 10 times the jump and I just want you to make one.Thanks for the help


[@EventItem_SpecialTeleport]
{
#ACT
SetItemEvent 3 61 @SpecialTeleport




[@SpecialTeleport_Main]
#if
checkitem SpecialTeleport 1
#ACT
take SpecialTeleport 1
break


Mov A1 %USERMAP
Mov A2 %USERx
Mov A3 %USERY
mapmove "%A1,%A2,%A3,100" %username






}






[@EventItem_SpecialTeleport]
{
#ACT
SetItemEvent 3 61 @SpecialTeleport \\ I suggest to use 61 55 instead of 3 61




[@SpecialTeleport_Main] \\ Why you used " _Main " when early you set to go to @SpecialTeleport
#if
checkitem SpecialTeleport 1 \\ Why you use checkitem when it supposed to click on the " random potion "
#ACT
take SpecialTeleport 1
break \\ Why you use break function when you have a next action followed by that?


Mov A1 %USERMAP
Mov A2 %USERx
Mov A3 %USERY
mapmove "%A1,%A2,%A3,100" %username






Try this :

Code:
[@EventItem_SpecialTeleport]
{
#ACT
             SetItemEvent 61 55 @TeleportClick


[@TeleportClick]
#ACT
             take SpecialTeleport 1
             goto @SpecialTeleport2


[@SpecialTeleport2]
#ACT
             Mov A1 %USERMAP
             Mov A2 %USERX
             Mov A3 %USERY
             mapmove "%A1,%A2,%A3,100" %username
}
 
  • Like
Reactions: Cayetano
Upvote 0