Jump to content
  • 0

help remove popup dialogue in npc


Question

Posted

this is working script from @Emistry but i need to remove the dialogue so that it wont be abuse by players, once they enter the machine, there's no cancelling of what they get. but how can i do this? any one? thanks

prt_in,125,33,3	script	Rolling Machine	562,{
//announce strcharinfo(0)+" is using rolling machine!",0,0xF0A804;
set @npc$,"[ Roll Machine ]";
// How many Items can be Choose
set .List,1;
// Hours Delay for each Roll
set .Hours,24;
// Ticket ID used for this Roll Machine
set .TicketID,7227;
// Items Available to Gain through Roll Machine
setarray .Items[0],12202,12203,12204,12205,12206,12207,14003,673;
// Amount of Ticket required to change into Items.
setarray .Cost[0],1,1,1,1,1,1,1,1;
if ( #Roll_Claimed > gettimetick(2) ){
mes "You already rolled for the day";
mes "see you tomorrow";
}else{
mes @npc$;
mes "Roll the machine?";
next;
//if( select("Yes!:No! not yet") == 2 ) close;
mes @npc$;
mes "Are you sure?";
next;
if( select("Yes, let's roll it!:I change my mind") == 2 ) close;
mes @npc$;
mes "Random Item Flashing....";
mes "Rolling........";
next;
//mes @npc$;
mes "Item Apear List :";
mes "[ ^FF0000Required Items^000000 ] [ ^0000FFItem Gain^000000 ]";
for( set .x,0; .x < .List; set .x,.x + 1 ){
 set .Random,rand( getarraysize( .Items ) );
 set .Rolled[.x],.Items[.Random];
 set .RolledCost[.x],.Cost[.Random];
 mes "^FF0000"+.RolledCost[.x]+" x "+getitemname( .TicketID )+" = ^0000FF"+getitemname( .Rolled[.x] )+"^000000";
 set .@Menu$,.@Menu$ + getitemname( .Rolled[.x] )+":";
}
set .@i,select( .@Menu$ ) - 1;
mes "This item cost ^FF0000"+.RolledCost[.@i]+" x "+getitemname( .TicketID )+"^000000.";
next;
//if( select("Spend my Ticket:Waste my roll") == 2 ) close;
 mes @npc$;
 if( countitem( .TicketID ) < .RolledCost[.@i] ){
  mes "You need ^0000FF"+.RolledCost[.@i]+" ^0000FF"+getitemname( .TicketID )+"^000000";
  mes "Better luck next time";
 }else{
  mes "Thanks for using Roll Machine";
  set #Roll_Claimed,gettimetick(2) + ( .Hours * 3600 );
  getitem .Rolled[.@i],1;
  delitem .TicketID,.RolledCost[.@i];
 }
}
close;
}

 

123.png

1 answer to this question

Recommended Posts

  • 0
Posted

Hey,

One way is to move this:

set #Roll_Claimed,gettimetick(2) + ( .Hours * 3600 );

In to the Item Apear List dialogue before next; like this:

mes "Item Apear List :";
mes "[ ^FF0000Required Items^000000 ] [ ^0000FFItem Gain^000000 ]";
set #Roll_Claimed, gettimetick(2) + ( .Hours * 3600 );

If player cancel the roll, the daily roll will be set anyway. So he can't re-roll ?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...