Ragnarok Online > RO Graphic, Coding & Media

[SOLVED] Need help making NPC that non-clickable

(1/1)

namerpus18:
Hello everyone it's me again - the noob :)
I have this NPC that I want to make non-clickable. Instead, I want it to be triggered if a player comes 1cell near this NPC. I tried to make it npcID# "-1903" but it became invisible /wah. But it is working the way I want it, but the only problem is it is invisible :P I want to be a visible NPC.
I know this will be helpful to me someday so I am experimenting with it so I know when the time comes that I will need it.
As always, thank you so much for the help  /lv


--- Code: ---prontera,147,173,4 script Chest#01 1903,1,1,{
mes "Opening chest in";
sleep2 1000;
mes "5...";
sleep2 1000;
mes "4...";
sleep2 1000;
mes "3...";
sleep2 1000;
mes "2...";
sleep2 1000;
mes "1...";
sleep2 1000;
        //extra script here to obtain the item from the chest
mes "Loot obtained.";
close;
}
--- End code ---

Insomnia2000:
Just add an "end;" at the very beginning and an "OnTouch:" label shortly after like so. You'll still end up with the "..." cursor, but clicking on the NPC will do nothing.


--- Code: ---prontera,147,173,4 script Chest#01 1903,1,1,{

end;

OnTouch:
mes "Opening chest in";
sleep2 1000;
mes "5...";
sleep2 1000;
mes "4...";
sleep2 1000;
mes "3...";
sleep2 1000;
mes "2...";
sleep2 1000;
mes "1...";
sleep2 1000;
        //extra script here to obtain the item from the chest
mes "Loot obtained.";
close;
}

--- End code ---

namerpus18:

--- Quote from: Insomnia2000 on Nov 25, 2022, 08:01 am ---Just add an "end;" at the very beginning and an "OnTouch:" label shortly after like so. You'll still end up with the "..." cursor, but clicking on the NPC will do nothing.


--- Code: ---prontera,147,173,4 script Chest#01 1903,1,1,{

end;

OnTouch:
mes "Opening chest in";
sleep2 1000;
mes "5...";
sleep2 1000;
mes "4...";
sleep2 1000;
mes "3...";
sleep2 1000;
mes "2...";
sleep2 1000;
mes "1...";
sleep2 1000;
        //extra script here to obtain the item from the chest
mes "Loot obtained.";
close;
}

--- End code ---

--- End quote ---

WOW! It worked.   /lv
Thank you so much

Navigation

[0] Message Index

Go to full version