doommap Posted December 5, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 30 Reputation: 0 Joined: 11/21/12 Last Seen: April 21, 2021 Share Posted December 5, 2012 Script Request: Itemizer Map: pvp_n_8-5,117,107 Functions: Minimum GM Level: 60 Itemizer can give 2 items id number: 7227 this comes with delay for 1 hour global, Minimum 1, Maximum Prize to give 5 id number: 7711 doesnt have delay Minimum 1, Max prize to give 20 need to Input Winners name then the npc will auto give the prize Announce the winners name and what kind of prize he won and the gm that gave him the prize Check if the player is online Check weight hmm bump? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 7, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 7, 2012 (edited) http://www.eathena.ws/board/index.php?showtopic=269783 /* create table log.gm_item_giver ( id int(11) not null auto_increment primary key, `time` datetime, gm_give varchar(23), receiver varchar(23), itemid smallint(11), amount smallint(6) ) engine = archive; */ // ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,155,184,4 script dksfjskjf 100,{ set .@eventgmlevel, 60; // event gm level setarray .@itemid, 7227, 7711; // the only item id to give setarray .@maxamount, 5, 20; // maximum amount of item to give. this is give 1000 red pot maximum setarray .@delay, 60, 60; // delay in minute // can give red potion , max 1000, delay 1 minute // can give orange potion, max 100, delay 2 minute if ( getgmlevel() < .@eventgmlevel ) end; mes "input the player name"; next; if ( input(.@name$, 4,23) ) close; else if ( set( .@aid, getcharid(3, .@name$) ) == 0 ) { mes "player not exist or not online"; close; } else if ( .@aid == getcharid(3) ) { mes "that's you ... baka"; close; } mes "select the item to give"; next; set .@size, getarraysize(.@itemid); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) set .@menu$, .@menu$ + getitemname(.@itemid[.@i]) +":"; set .@menu, select(.@menu$) -1; if ( getd( "#gm_give_"+ .@itemid[.@menu] ) + .@delay[.@menu] * 60 > gettimetick(2) ) { mes "you still can't give this prize to players"; mes "time left: "+ callfunc("timeleft__", getd( "#gm_give_"+ .@itemid[.@menu] ) + .@delay[.@menu] * 60 - gettimetick(2) ); close; } mes "input amount to give."; mes "max = "+ .@maxamount[.@menu]; next; if ( input(.@amount, 1, .@maxamount[.@menu]) ) close; set .@name$, rid2name(.@aid); mes "are you sure want to give"; mes .@name$ +" "+ .@amount +" "+ getitemname(.@itemid[.@menu]) +" ?"; next; if ( select ("Yes:No") == 2 ) close; else if ( isloggedin(.@aid) == 0 ) { mes "player suddenly log off"; close; } .@origin = getcharid(3); attachrid .@aid; if ( !checkweight( .@itemid[.@menu], .@amount ) ) { attachrid .@origin; mes "player is currently overweight"; close; } getitem .@itemid[.@menu], .@amount; attachrid .@origin; announce strcharinfo(0) +" give "+ .@name$ +" "+ .@amount +" "+ getitemname(.@itemid[.@menu]), 0; setd "#gm_give_"+ .@itemid[.@menu], gettimetick(2); query_logsql "insert into gm_item_giver values ( null, now(), '"+ escape_sql( strcharinfo(0) ) +"', '"+ escape_sql(.@name$) +"', "+ .@itemid[.@menu] +", "+ .@amount +")"; close; } EDIT: update timeleft__ function -- offtopic -- @Emistryjust an advice, if you wanna be great scripter like me, stop copy others work with simple edit make script from scratch makes you learn faster LMAO !!! I forgotten I said that XD Edited February 2, 2013 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
doommap Posted December 10, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 30 Reputation: 0 Joined: 11/21/12 Last Seen: April 21, 2021 Author Share Posted December 10, 2012 thanks annie, i dont know why but i cannot access my eathena.ws site here, thats why i made this topic again. anyway thankyou Quote Link to comment Share on other sites More sharing options...
Question
doommap
Script Request: Itemizer
Map: pvp_n_8-5,117,107
Functions:
Minimum GM Level: 60
Itemizer can give 2 items
id number: 7227 this comes with delay for 1 hour global, Minimum 1, Maximum Prize to give 5
id number: 7711 doesnt have delay Minimum 1, Max prize to give 20
need to Input Winners name then the npc will auto give the prize
Announce the winners name and what kind of prize he won and the gm that gave him the prize
Check if the player is online
Check weight
hmm bump?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.