//Made : Goddameit
//Time : 2010/05/07
//Home : http://www2.okay88.com/?fromuid=12556
prontera,145,180,4 script [PoPo] 112,{
if(@popostwr){
announce "[Po-Po]:Please re-login server",bc_self;
end;
}
mes "Po-Po points:"+popopos;
deletearray @poi[0],128;
set @pocost,0;
set @po,0;
set @yu,0;
set @poselect$,"";
menu "[Po-Po GO!]",staer,"[buy Po-Po Item]",buir;
staer:
mes "You can't leave this map and join into any chat or vend";
select("[OK]");
close2;
set @popostwr,1;
announce "[Po-Po]:Thank for you use.",bc_self;
addtimer $@popodelay,"[PoPo]::OnTimeout";
end;
buir:
set @poselect$,"[bUY!!]";
for(set @po,0;@po<getarraysize($@sellitem);set @po,@po+1){
set @poselect$,@poselect$+":["+(@poi[@po]?"^FF0000":"^000088")+""+getitemname($@sellitem[@po])+"^000000]["+$@sellcost[@po]+"]"+(@poi[@po]?"("+@poi[@po]+")":"");
}
set @yu,select(@poselect$);
if(@yu!=1){
announce "[Po-Po]:Input how many you want.",bc_self;
input @ponum;
if(@ponum>=0){
set @poi[@yu-2],@ponum;
goto buir;
}
}
for(set @po,0;@po<getarraysize($@sellitem);set @po,@po+1){
set @pocost,@pocost+$@sellcost[@po]*@poi[@po];
}
mes "You have to pay me ["+@pocost+"po]";
select("[OK~]");
if( @pocost > popopos ){
mes "Your Po-Po isn't enough";
close;
}
for(set @po,0;@po<getarraysize($@sellitem);set @po,@po+1){
getitem $@sellitem[@po],@poi[@po];
}
set popopos,popopos-@pocost;
close2;
deletearray @poi[0],128;
set @pocost,0;
set @po,0;
set @yu,0;
set @poselect$,"";
end;
OnTimeout:
getmapxy(@popom$,@popo,popoy,0);
if(@popom$=="prontera"&&!checkvending()&&!checkChatting()){
set popopos,popopos+1;
announce "[Po-Po]:Get 1 point, now have "+popopos,bc_self;
addtimer $@popodelay,"[PoPo]::OnTimeout";
}
end;
OnInit:
setarray $@sellitem[0],607,608;
setarray $@sellcost[0],10,5;
set $@popodelay,10000;
end;
}
Edit at
setarray $@sellitem[0],607,608; //What you want to sell
setarray $@sellcost[0],10,5; //and its price
set $@popodelay,10000; //Go through how many time will get a point ( 1s = 1000 )