DJFUNK Posted January 8, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 115 Reputation: 4 Joined: 10/25/12 Last Seen: August 31, 2023 Share Posted January 8, 2013 (edited) I have a portal NPC, and I got a problem. prontera,72,226,1 script portal::portal1 45,2,2,{ set @Prize,rand(3); if (@Prize==1) goto: sidji; if (@Prize==2) goto: loeroe; if (@Prize==3) goto: teloe; sidji: getitem 606,10; atcommand "@load"; close; loeroe: getitem 608,20; atcommand "@load"; close; teloe: getitem 607,20; atcommand "@load"; close; } if player enter that portal, get random price. but, it doesn't work... thank's for advance:) Edited January 11, 2013 by DJFUNK Quote Link to comment Share on other sites More sharing options...
ICEROCK Posted January 8, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 228 Reputation: 33 Joined: 11/15/12 Last Seen: July 22, 2016 Share Posted January 8, 2013 prontera,72,226,1 script portal::portal1 45,2,2,{ set @Prize,rand(1,3); if (@Prize==1) goto sidji; if (@Prize==2) goto loeroe; if (@Prize==3) goto teloe; sidji: getitem 606,10; atcommand "@load"; close; loeroe: getitem 608,20; atcommand "@load"; close; teloe: getitem 607,20; atcommand "@load"; close; } Quote Link to comment Share on other sites More sharing options...
Schrwaizer Posted January 8, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 43 Reputation: 15 Joined: 06/24/12 Last Seen: April 11 Share Posted January 8, 2013 Why don't you use warp "SavePoint",0,0; Instead of and atcommand? Quote Link to comment Share on other sites More sharing options...
Zasura Posted January 8, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 48 Reputation: 4 Joined: 11/27/11 Last Seen: October 22, 2020 Share Posted January 8, 2013 Add OnTouch Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 9, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 9, 2013 prontera,156,172,1 script portal1 45,2,2,{ switch ( rand(3) ) { default: getitem 606,10; break; case 1: getitem 608,20; break; case 2: getitem 607,20; } warp "Save", 0,0; end; } no need OnTouch, if the npc already has 2,2 ... defined the radius, it automatically trigger as it is having an OnTouch Quote Link to comment Share on other sites More sharing options...
Schrwaizer Posted January 10, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 43 Reputation: 15 Joined: 06/24/12 Last Seen: April 11 Share Posted January 10, 2013 (edited) prontera,156,172,1 script portal1 45,2,2,{ switch ( rand(3) ) { default: getitem 606,10; break; case 1: getitem 608,20; break; case 2: getitem 607,20; } warp "Save", 0,0; end; } no need OnTouch, if the npc already has 2,2 ... defined the radius, it automatically trigger as it is having an OnTouch I guess it needs Ontouch... because if the players clicks the portal, the effects will trigger. x_x I don't think that it is the point of a portal anw, just for semantic reasons. So, you can just add this to Annie's awesome script: prontera,156,172,1 script portal1 45,2,2,{ end; // Do nothing when the player clicks OnTouch: // Execute script when the player approaches switch ( rand(3) ) { default: getitem 606,10; break; case 1: getitem 608,20; break; case 2: getitem 607,20; } warp "Save", 0,0; end; } @edit: fixed typo at my bbcode Edited January 10, 2013 by Schrwaizer Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 10, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 10, 2013 I guess it needs Ontouch... because if the players clicks the portal, the effects will trigger. x_xreally ? o.oin my test server, if you click on warp portal npc ID 45, you will walk to the portal instead of triggering it from clicking Quote Link to comment Share on other sites More sharing options...
Schrwaizer Posted January 10, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 43 Reputation: 15 Joined: 06/24/12 Last Seen: April 11 Share Posted January 10, 2013 I see... so, forget that. I thought it would be treated like a normal NPC. xD Quote Link to comment Share on other sites More sharing options...
DJFUNK Posted January 11, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 115 Reputation: 4 Joined: 10/25/12 Last Seen: August 31, 2023 Author Share Posted January 11, 2013 thank's a lot have any idea, to write this script http://rathena.org/board/topic/77115-request-auto-game-warp-event/ Quote Link to comment Share on other sites More sharing options...
Question
DJFUNK
I have a portal NPC, and I got a problem.
if player enter that portal, get random price.
but, it doesn't work...
thank's for advance:)
Edited by DJFUNKLink to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.