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