Jump to content
  • 0

NPC do /dice and whatever the amount is. player gets amount.


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

The guild leader talks to an NPC. the NPC will do /dice. whatever the amount is. the guild leader gets.

However, there's limitation of 2 dice chances. once item "13825" is given from the 2 dice chances.

the leader won't be able to talk to the NPC until the next WoE end.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

Even using the emoticon "/dice", there's no way to guess beyond a script which number has came from it. If I make this NPC to you, it will have to use random numbers that may not match to the emoticon numbers.

Anyway, I got some doubts while reading your topic. Well, whatever number comes out, the guild leader will get his prize? I didn't got it. Can you explain well?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

you can use a random number between 1-6 and lets say for example 5 comes out, then you can make the npc dice 5.

The same way dice event works. You can use the random value for the price, that would be the invoking character which

is interacting with the npc. Pretty easy.

Well you can't dice "13825" if you mean that.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

you can use a random number between 1-6 and lets say for example 5 comes out, then you can make the npc dice 5.

The same way dice event works. You can use the random value for the price, that would be the invoking character which

is interacting with the npc. Pretty easy.

Well you can't dice "13825" if you mean that.

Yeah, that's what I was planning to do. But he said "whatever the amount is. the guild leader gets". I'm wondering if it wins despite any result, because if it is like that, the dice is somewhat pointless.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Oh, true I'm sorry about the request. Let me rephrase the request.

When WoE ends, an NPC will be enable for the guild leader to talk to. He or she will have a chance from 1 to 6 amount. He or she will get the item by the random amount got. Also, he or she cannot talk to the NPC more than twice. When WoE starts, variable will be removed to that character so he or she will be able to talk to the NPC once again IF they got the castle again..

When WoE starts, the variable will be deleted and the NPC will be disable again.

Pretty much, NPc will only appear when WoE ends and disappear when WoE starts.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Thank you sir :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

Here it is!

prontera,150,150,6	script	WoE Prize	403,{
set .@n$,   "[WoE Prize]";					   // NPC name
set .@id,   13825;							   // Prize ID
set .@gid,  getcharid(2);						// Character's GuildID
set .@gnm$, strcharinfo(2);					  // Character's GuildNAME
set .@gld$, getguildmaster(.@gid);			   // Character's GuildMasterName
set .@gcas, getcastledata("your castle here",1); // ID of the guild castle owner
	if( .hasget )
	{
		mes .@n$+"\rThe prize has already been taken!";
		close;
	}
	if( .@gcas != .@gid )
	{
		mes .@n$+"\rYour guild isn't this castle owner!";
		next;
		mes .@n$+"\rOnly the Guildmaster of this castle owner guild can have access to the prize!";
		close;
	}
	if( strcharinfo(0) != .@gld$ )
	{
		mes .@n$+"\rYou're not the "+.@gnm$+"'s Guildmaster.";
		next;
		mes .@n$+"\rOnly the Guild Master have access to the Prize!";
		close;
	}
mes .@n$+"\rHello, "+.@gnm$+" Guildmaster!";
mes "I'm the WoE Prizer NPC, it looks like that you haver won this last WoE, huh!";
next;
mes .@n$+"\rAs the owner of this castle, you have the bonification of getting a prize.";
next;
mes .@n$+"\rI'll do you a sortition with /dice...";
next;
mes .@n$+"\rDon't be afraid, you don't have one-to-six chance to win!";
next;
mes .@n$+"\rYou will be rewarded wherever result comes out, the dice is just to define the quantity of it!";
next;
mes .@n$+"\rMay I start, then?";
next;
mes .@n$+"\rLet's roll!";
close2;
sleep2 1000;
set @rdice, rand(1,6);
setarray .@dicemots[1],58,59,60,61,62,63;
emotion .@dicemots[@rdice];
sleep2 2000;
mes .@n$+"\rHere it is!";
getitem .@id,@rdice;
set .hasget, 1;
close;


OnAgitEnd:
enablenpc strnpcinfo(3);
end;

OnAgitStart:
OnInit:
disablenpc strnpcinfo(3);
set .hasget, 0;
end;
}

I apologize my lateness, yesterday was reveillon party. :P

If there's any error with the script, call me. Don't forget to change it's coordinates and "your castle here" (I used prtg_cas03 to test it).

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Thank you :D I'll test it now :D

btw, can i just do @reloadscript?

Bump!

When I load the NPC or @reloadscript after I put the file. The NPC goes away.

Not sure if it's connected to the problem but in the Map server. it says npc_scriptcont: failed npc_checknear test

... OR does it really suppose to be gone and only pops out when WoE ends?

Edited by Dreamworks
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

Disabled when logged and when WoE Starts, but it is enabled when WoE ends.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Oh alright, so it's going to be available right after the WoE ends. Thank you :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

Oh alright, so it's going to be available right after the WoE ends. Thank you :)

Uh-oh! I just read the error you said from your map-serv! Another NPC have bugs, and you'll probably get an error with it later. Do you have it's name from map-server debug?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Yeah it doesn't show no more last time I reloaded the script. Maybe it just got duplicated :)

Edit:

Sir, the guild leader in the server reported he only had one chance to talk to the NPC or get the reward.. and he only got one amount. but im still looking forward for the next woe to see if its the NPC or he is just unlucky haha

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   15
  • Joined:  06/24/12
  • Last Seen:  

Have you asked him the result the dice emoticon displayed? I've tested this script with some friends couple WoEs and it turned out to be flawless. /swt

@edit:

Oh, sorry! It's really permitting only one chance, I completely forgot this!

Change the following parts in the script:

This:

	mes .@n$+"\rLet's roll!";
close2;
sleep2 1000;
set @rdice, rand(1,6);
setarray .@dicemots[1],58,59,60,61,62,63;
emotion .@dicemots[@rdice];
sleep2 2000;
mes .@n$+"\rHere it is!";
getitem .@id,@rdice;
set .hasget, 1;
close;

Into this:

	mes .@n$+"\rLet's roll!";
close2;
sleep2 1000;
set @rdice, rand(1,6);
setarray .@dicemots[1],58,59,60,61,62,63;
emotion .@dicemots[@rdice];
sleep2 2000;
   getitem .@id,@rdice;
   set .hasget, 1;
   mes .@n$+"\rHere it is!\rLet's roll once again!";
   close2;
   set @rdice, rand(1,6);
   sleep2 1000;
mes .@n$+"\rHere it is!";
getitem .@id,@rdice;
set .hasget, 2;
close;

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


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Thank you! Will be testing :)

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...