Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. I don't understand your request
  2. Put a delwaitingroom before waitingroom delwaitingroom; waitingroom "Petite Room",0;
  3. I mean re try to load the alter sql alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`);
  4. You should make a post in the bug tracker
  5. set .Prize,7539,505; // Reward item ID set .Amount,10,10; // Reward item amount You must define an array variable when you use it setarray .Prize,7539,505; // Reward item ID setarray .Amount,10,10; // Reward item amount In the end of the script, make a loop to give all items. for ( .@i = 0; .@i < getarraysize( .Prize ); .@i++ ) getitem .Prize[.@i], .Amount[.@i]; instead of getitem .Prize, .Amount;
  6. prontera,157,181,5 script Sample 757,{ if( getgmlevel() < 80 ){ mes "I only serve GM Staffs"; }else{ mes "Input the Player Name "; mes "Type ^FF0000CANCEL^000000 to cancel."; input .@Name$; if( compare( .@Name$,"cancel" ) ) close; if ( !getcharid( 3,.@Name$ ) ) { query_sql "select `account_id` from `char` where `name` = '"+ escape_sql( .@Name$ ) +"'", .@account_id; if ( !.@account_id ) close; } next; mes "What item to be Given ?"; do{ input .@ItemID,501,32767; if( getitemname( .@ItemID ) == "" ) mes "Invalid Item ID"; }while( getitemname( .@ItemID ) == "" ); mes "Input the Amount of "+getitemname( .@ItemID )+" to be given."; mes "Min. 1 ~ Max. 10"; input .@Amount,1,10; mes "If it is Equip...how much it should be Refined ?"; input .@Refine,0,10; next; mes "Receiver : ^0000FF"+.@Name$+"^000000"; mes "Item : ^FF0000"+getitemname( .@ItemID )+"^000000"; mes "Amount : ^FF0000"+.@Amount+"^000000"; mes "Refine : ^FF0000"+.@Refine+"^000000"; if( select("Confirm:Cancel") == 1 ){ announce "[ "+.@Name$+" ] gained "+.@Amount+" x "+getitemname( .@ItemID )+" from GM.",0; if ( getcharid( 3,.@Name$ ) ) { message .@Name$,"You have gained "+.@Amount+" x "+getitemname( .@ItemID )+" from GM."; getitem2 .@ItemID,.@Amount,1,.@Refine,0,0,0,0,0,getcharid( 3,.@Name$ ); } else { query_sql "select `account_id` from `char` where `name` = '"+ escape_sql( .@Name$ ) +"'", .@account_id; query_sql "insert into `global_reg_value` values ( '0', '#gift_iditem', '"+ .@ItemID +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@ItemID +"'"; query_sql "insert into `global_reg_value` values ( '0', '#gift_amountitem', '"+ .@Amount +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@Amount +"'"; query_sql "insert into `global_reg_value` values ( '0', '#gift_refineitem', '"+ .@Refine +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@Refine +"'"; } } } close; OnPCLoginEvent: if ( #gift_iditem ) { getitem2 #gift_iditem, #gift_amountitem,1, #gift_refineitem,0,0,0,0,0; message strcharinfo(0),"You have gained "+ #gift_amountitem +" x "+getitemname( #gift_iditem )+" from GM."; #gift_iditem = #gift_amountitem = #gift_refineitem = 0; } end; } Make a copy of your database, just in case...
  7. So ,rand( 871,90,823,872 ) ); doesn't work Try this OnInit: while(1) { sleep 5000; setnpcdisplay( strnpcinfo(0),callfunc( "F_RandMes", 4, 871,90,823,872 ) ); }
  8. Capuche

    MVP Announcer

    Another way - script Test -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid,21 )&0x0020 && getgmlevel() > 0 ) announce "[ GM ] "+strcharinfo(0)+" has killed MVP Monster named [ "+getmonsterinfo(killedrid,0)+" ] which located at the map of [ "+strcharinfo(3)+" ]",0; end; }
  9. Try it ? Commons files: http://eathena.ws/forum/topic/40-euphys-quest-shop/ http://rathena.org/board/files/file/2504-multi-currency-shop/
  10. Another way : According to the docs. Sample: only female gender can equip this.
  11. I don't have any errors except for the <tab> in the header. Show your error on mapserv.
  12. @rakuzas Try Clone command
  13. - script atcmd_example -1,{ OnInit: bindatcmd "storage",strnpcinfo(3)+"::OnAtcommand"; bindatcmd "go",strnpcinfo(3)+"::OnAtcommandGO"; .item_req = 501; // you item id end; OnAtcommand: if ( countitem( .item_req ) ) openstorage; // open storage if have the item end; OnAtcommandGO: if ( !countitem( .item_req ) ) end; // @go if have the item for( ; .@i < .@atcmd_numparameters; .@i++ ) .@mes$ = .@mes$ + ( .@mes$ == "" ? "" : " " ) + .@atcmd_parameters$[.@i]; atcommand "@go "+ .@mes$; } Use rentitem I don't get this part
  14. Use mapflag item_noequip is a better idea if you have too much item instead of checking all items in a loop Nope. Your script make a loop if the player enter in a castle map but your loop never end => There will be several loop if the player enter several time. No need to continue your loop if the player is not on the map. getmapxy( @map$, @x, @y, 0 ); No need this
  15. Change .size = getarraysize( .reward ); into set .size, getarraysize( .reward ); Don't forget to load in mysql // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`);
  16. Nope. It's coz the script also check in the case of max size, but there is nothing defined in max size.. so it throw an error I 'm not sure to understand what you mean... The size of the array ? My max array is defined by .size_don I fixed mine btw yeah, you script should working
  17. My script is this one Do you use rathena ?
  18. I suggest set .@mmap7, getmapusers("2@pump"); if ( .@map7 == 0 ) { hideonnpc "Ryze#1"; set getvariableofnpc( .ToweKilled, "Ryze#1" ), 0; ... = 0; } if(gettimetick(2) - noctdead < (60 * 60 * 12)) { Miscs : set map7,getmapusers("2@pump"); no need to use permanent variable for this, use .@map variable sleep2 5000; awake "Ryze#1"; no need awake after a sleep, the script continue after the count You can use .ToweKilled variable instead of $ToweKilled
  19. Jellopie is the item by default in the menu. Don't forget to make a reload script to load the item in the menu
  20. will this work? countitem(909,910,911) >= 1 Nope. You must make a loop. - script nodonatemap -1,{ OnInit: setarray .donateitems[0],21849; .size_don = getarraysize( .donateitems ); end; OnPCLoadMapEvent: if ( strcharinfo(3) != "pvp_n_4-3" ) end; while( .@i < .size_don ) { if ( countitem( .donateitems[.@i] ) ) break; .@i++; } if ( .@i == .size_don ) end; // no item found warp "SavePoint",0,0; end; } pvp_n_4-3 mapflag loadevent Edit : fix throw error, thanks DeadlySilence
  21. Not sure to get what you want.. store the killedrid in a tmp value ? .@tmp$ = rid2name( killedrid ); announce .@tmp$ +" has been killed !", 0;
  22. With just this if (@map$ == "pvp_n_4-3") { if (countitem(.donateitems) >= 1) the script will only check the first value in the array like if (countitem(.donateitems[0]) >= 1) You must make a loop to check all item in the array btw you wrote countitem count the number of item in the inventory, items equipped include. If you only want to check if he is wearing something, use isequippedcnt command if ( isequippedcnt(21849,21850,21851,21852,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,1316,1588,1932,1987,1833,1700,13435,1500,1600,13080,13079) > 0 ) { warp "SavePoint",0,0; end; }
  23. prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop",1; } => only shop headgear prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop",1,2; } => only shop headgear + weapon
×
×
  • Create New...