Jump to content
  • 0

Poring Event


Hyoru

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

I remember a event like this:

Its a Poring NPC, with a small chance to win, if you fail you are warped few steps away from the Poring. The first player that hits correct wins.

Someone have something like that? or can give me instruction how to do it? Thanks Adv.

(sorry for my bad english)

Edited by Hyoru
Link to comment
Share on other sites

22 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

no... its a NPC, when you click him, you have a chance to win and lose, if you lose you are warped some steps away from him, and if you win he disappear and you get the prize. With a low chance to win...

look how this works:

If you fail, you'll back some steps away from him and run to "talk" again.... first lucky person, wins.

Edited by Hyoru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

Soo basically a click the cow except there aren't any effects but pushback...?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

pushback or a low chance to get the prize.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

Posted · Hidden by Shikka, April 21, 2012 - to early postet
Hidden by Shikka, April 21, 2012 - to early postet

rontera,100,100,0 scriptYggdrasil Gatekeeper 111,8,8,{

Link to comment

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

loadeventnpc:

- script loadporingevent -1,{

//choose 1 of the 2 options.
//disable the others or delete them
//you can use to enable:
if (gettime(4) == 0) enablenpc "poring#event1"; // enable on sunday at 0 am (saturday -> sunday)
//or:
if (gettime(4) == 0 && gettime(3) == 8) enablenpc "poring#event1"; // enable on sunday at 8 am


//and to disable again:
if (gettime(4) == 0 && gettime(3) == 10) disablenpc "poring#event1"; // if no one wins in 2 hours it would be disabled again
}

// don't add the following to your npc:

gettime(x) // x can be one of the following numbers.

1 - Seconds (of a minute)

2 - Minutes (of an hour)

3 - Hour (of a day)

4 - Week day (0 for Sunday, 6 is Saturday)

5 - Day of the month.

6 - Number of the month.

7 - Year.

8 - Day of the year.

event npc:

prontera,100,100,0	script	poring#event1	1002,{ // 1002 = poring sprite? - i dunno if it works ^^

if ($won == 1) {sorry, but one player already won.}
set @rand,rnd(1,100000) // 1,100000 = 1-100000 you can edit the chance to win or lose 

//choose 1 of this options.
//disable the others or delete them
//you can use:
if (@rand == 1) {set $won,1;goto win;} // mean only the user with getting random 1 is able to win and $won will end the clickable npc for all others
//or:
if (@rand < 2) {set $won,1;goto win;} // means the user with a number under 2 will win and $won will end the clickable npc for all others
//even this is an option:
if (@rand > 2) {set $won,1;goto win;} // means the user with a number higher then 2 will win... a really good chance to win at 1 up to 100000... xD and $won will end the clickable npc for all others
goto lose;

win:
if ($win != getcharid(0)) {sorry, but another player already won.} // prevents that more than one player can win
set $win,getcharid(0); // prevents that more than one player can win at a time
mes "wow..."
mes "You've won!";
next;
mes "Here is your Reward";
getitem xy,1; // xy = the item-id
close2;
disablenpc "poring#event1";
end;

lose:
warp "prontera",105,105;
end;
}

don't forgett to delete or // the sentences who wont fit your request.

didn't test it, but should work.

hope i understood the request :)

if i didn't, just tell me, i'll write another one, if you want

Edited by Shikka
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Thanks a lot! but how I can make this event start all days 4PM ?

and i got this error

errorww.jpg

Edited by Hyoru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

sorry, wrote to fast xD

if ($won == 1) {sorry, but one player already won.} <--- wrong

if ($won == 1) {mes "sorry, but one player already won.";} <--- right

to start the event everyday you've to write this:

- script loadporingevent -1,{

OnInit: // forgott this command in the npc above

OnHour16: // forgott this command in the npc above

if (gettime(4) >= 0 && gettime(4) <= 6 && gettime(3) == 16) enablenpc "poring#event1"; // enable on all days at 4 pm

(should work, but i did not test it)

}

Edited by Shikka
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

another one:

errorwvb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

set @rand,rnd(1,100000) //wrong

set @rnd,rand(1,100000) //right. sorry, changed the two commands ^^

Edited by Shikka
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

change

set @rand,rnd(1,100000) // what ever is behind this

to

set @rand,rand(1,100000); //1,100000 = 1-100000..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

yeah, just one more thing, when i win, he says:

sorry but one player already won.

wow...

you've won!

and give me prize

Edited by Hyoru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

I'll write the npc's new, gimme one minute

1 npc

- script loadporingevent -1,{

OnInit: // forgott this command in the npc above

OnHour16: // forgott this command in the npc above

if (gettime(4) >= 0 && gettime(4) <= 6 && gettime(3) == 16) enablenpc "poring#event1"; // enable on all days at 4 pm

}

2 npc

prontera,100,100,0 script poring#event1 1002,{ // 1002 = poring sprite? - i dunno if it works ^^

if ($won == 1) {mes "sorry, but one player already won."; close;}

set @rnd,rand(1,100000) // 1,100000 = 1-100000 you can edit the chance to win or lose :)

//choose 1 of this options.

//disable the others or delete them

//you can use:

if ($won == 1){mes "sorry, but another player already won.";close;}

if (@rnd == 1) {set $won,1; set $win,getcharid(0); goto win;} // mean only the user with getting random 1 is able to win and $won will end the clickable npc for all others

//or:

if (@rnd < 2) {set $won,1; set $win,getcharid(0); goto win;} // means the user with a number under 2 will win and $won will end the clickable npc for all others

//even this is an option:

if (@rnd > 2) {set $won,1; set $win,getcharid(0); goto win;} // means the user with a number higher then 2 will win... a really good chance to win at 1 up to 100000... xD and $won will end the clickable npc for all others

goto lose;

win:

if ($win != getcharid(0)) {mes "sorry, but another player already won.";close;} // prevents that more than one player can win

mes "wow..."

mes "You've won!";

next;

mes "Here is your Reward";

getitem xy,1; // xy = the item-id

close2;

disablenpc "poring#event1";

end;

lose:

warp "prontera",105,105;

end;

}

so, this should be it...

because i've changed the @rnd,rand(1,100000)

you had to change the if(@rand == 1) to if (@rnd == 1) too.

so... i hope i've fixed all...

Edited by Shikka
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

I rescripted that terrible scripted thing a bit.. here is a version that should work

http://upaste.me/48e42035fbb61bc

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Shikka, last thing, promisse (:

the npc isn't hide... just after i won he desappear.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

thanks Nameless2you, sorry, i'm not good at scripting in one minute =D don't have much time at the moment (doing many things at the same time) xD

sorry for that bad scripts ^^

just tried to help a lil bit xD

Edited by Shikka
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Nameless2you he is saying that another player won. and he isnt hide too.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

Was still using old weird variables, fixed it all now, or so I hope..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/12
  • Last Seen:  

nevermind ^^

Nameless2you has fixed

(i hope)

Edited by Shikka
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

don't forget the end; =_=

but you don't need to use that anyways just go up and follow the link, I updated the paste..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Thanks a lot guys!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

can someone share this script ? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...