Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. menu "Armor",T_armor,"Shoes",T_shoes;
  2. if( rand(1) ) bonus2 bAddMonsterDropItem,908,200; else bonus2 bAddMonsterDropItem,909,200; ? forget it won't work
  3. EDIT : I didn't make enough check http://pastebin.com/raw.php?i=Tj3J2pjP
  4. Yes array can't be used for permanent char variable There are other way to do this - like store informations in NPC variable, sql, attachnpctimer, make a loop of temporary variable ( in OnInit for example ) which is update... here I chose permanent variable but you can try other way if you want XD
  5. Reward for top 3 setarray .@item_top, 501,502,503;// ID reward in order by rank - here top 1 gains item ID 501 if( $top3_pvprank$ != "" ) { explode( .@name$, $top3_pvprank$, "?" ); for( set .@i, 0; .@i < getarraysize( .@name$ ); set .@i, .@i + 1 ) { if( .@name$[ .@i ] == strcharinfo(0) ) { set .@name$[ .@i ], ""; set $top3_pvprank$, implode( .@name$, "?" ); getitem .@item_top[ .@i ], 1; mes "Congratulation you were in the top 3 last month."; close; } } } after Begin: while(1) {
  6. For each quest finished set Quest_finish, Quest_finish + 1; if( Quest_finish > 3 ) { mes "you can't take another quest"; close; }
  7. Be carefull @bcdelay @variable is temporary stored in the session of the player = he log out and all @variables are deleted
  8. Add OnDay0101: OnDay0201: OnDay0301: OnDay0401: OnDay0501: OnDay0601: OnDay0701: OnDay0801: OnDay0901: OnDay1001: OnDay1101: OnDay1201: query_sql "SELECT `name` FROM `pvpm_data` WHERE `type`=0 ORDER BY `ratio` DESC LIMIT 3", .@name$; if( getarraysize( .@name$ ) ) set $top3_pvprank$, implode( .@name$, "?" ); end; after if(getarg(0) == "PCLoadEvent") { getmapxy(@map$,@x,@y,0); if(getcastlename(@map$)=="") { set @RightWoEMap,0; end; } if(agitcheck() || agitcheck()) set @RightWoEMap,1; end; } Then add if( $top3_pvprank$ != "" ) { explode( .@name$, $top3_pvprank$, "?" ); for( set .@i, 0; .@i < getarraysize( .@name$ ); set .@i, .@i + 1 ) { if( .@name$[ .@i ] == strcharinfo(0) ) { deletearray .@name$[ .@i ], 1; if( getarraysize( .@name$ ) ) set $top3_pvprank$, implode( .@name$, "?" ); else set $top3_pvprank$, ""; getitem 501, 1; mes "Congratulation you were in the top 3 last month."; close; } } } after Begin: while(1) {
  9. This instance works for me I can't reproduce your error
  10. Top 3 for ratio ? or Top 3 for kills ?
  11. Not optimized way : duplicate label T_armor: and change all EQI_ARMOR by the equipment you want (example : EQI_SHOES to enchant shoes) in the duplicate Then add a new label (the duplicate) in the menu menu "Armor",T_armor,"Shoes",T_shoes;
  12. Capuche

    OnPCKillEvent

    Try this - script fghk -1,{ OnPCKillEvent: .@sub_killer$ = substr( strcharinfo(0),0,6 ); .@sub_killed$ = substr( rid2name( killedrid ),0,6 ); if( .@sub_killer$ == .@sub_killed$ ) getitem 7227, 5; else if( ( .@sub_killer$ == "[Wolf] " || .@sub_killer$ == "[Sheep]" ) && ( .@sub_killed$ == "[Wolf] " || .@sub_killed$ == "[Sheep]" ) ) getitem 7227, 10; end; }
  13. Like you ask : You can enchant other equipment with a little modification Same condition that Yudax's request ? tgc card, enchant failed, +3 limit, you can choose the enchant If not yeah do another topic
  14. You're welcome A delay for the player or his account ?
  15. compare(getarg(.e+1),"SZeny") compare command compare 2 strings and in your case getarg(.e+1) is a number Put +"" after getarg(.e+1) in all compare command to avoid this warning Example compare(getarg(.e+1) +"","SZeny")
  16. Yes but to be in the mood for make it is another history I will take a look EDIT: and voila
  17. You just need to write setarray .@m$[0], // message list "[ H ]", "[ H E ]", "[ H E A ]", "next message";// etc.. 3 times ? It *also does the 'spinning' part to this way
  18. It's not a bug, this script use sql and database in sql is not update instantly, it takes some time
  19. OnInit: set .@use_MD5_passwords, 0; // set to 1 for "yes" end; Small error if he put 1
  20. What did you do to fix your previous error ? I know the error I point it lol or post your current script
  21. Okay - script hjkl -1,{ OnMobDead: if( getcharid(1) ) { getpartymember( getcharid(1),2 ); getpartymember( getcharid(1),1 ); .@map_killer$ = strcharinfo(3); .@chance = rand(10); for( .@i = 0; .@i < $@partymembercount; .@i++ ) if( isloggedin( $@partymemberaid[ .@i ],$@partymembercid[ .@i ] ) ) if( !getmapxy( .@map$, .@x, .@y, 0, rid2name( $@partymemberaid[ .@i ] ) ) && .@map$ == .@map_killer$ ) { getitem 501, 1, $@partymemberaid[ .@i ];// put ID bronze coin instead of 501 if( !.@chance ) getitem 502, 1, $@partymemberaid[ .@i ];// put ID gold coin } } end; } This way the poring must be summon with an NPC *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>,"hjkl::OnMobDead"; EDIT: it should work with source modifications, sure
  22. 10% for each player in the party ? Example: 5 players in the party, all player have 10% chance to gain 1 gold coin so the party have 50% chance to gain 1 gold coin or just 10% chance to gain for the party ?
  23. prontera,159,180,5 script hjkl 456,{ mes "Enter a name."; input .@n$; if ( query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+ escape_sql( .@n$ ) +"'", .@a_id ) ) { query_sql("SELECT `char_id`, `guild_id` FROM `char` WHERE `account_id` = '"+ .@a_id +"'", .@c_id, .@g_id ); mes "Input an item ID."; input .@item; if( getitemname( .@item ) == "" ) { mes "wrong item ID"; close; } for( .@i = 0; .@i < getarraysize( .@c_id ); .@i++ ) { query_sql( "SELECT SUM(`amount`) FROM `inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_inv ); query_sql( "SELECT SUM(`amount`) FROM `cart_inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_cart ); query_sql( "SELECT SUM(`amount`) FROM `guild_storage` WHERE `guild_id` = "+ .@g_id[.@i] +" AND `nameid` = "+ .@item, .@count_gsto ); .@inv = .@inv + .@count_inv + .@count_cart; .@gsto = .@gsto + .@count_gsto; } query_sql( "SELECT SUM(`amount`) FROM `storage` WHERE `account_id` = "+ .@a_id +" AND `nameid` = "+ .@item, .@count_sto ); .@inv = .@inv + .@count_sto; } else { mes "Character '"+.@n$+"' does not exist."; close; } mes "Character '"+.@n$+"' has ^0055FF"+ .@inv +"^000000 "+ getitemname( .@item ) +" ("+ .@item +") in his account (storage, inventory, cart inventory).", ( !.@gsto ? "" : ( "And ^0055FF"+ .@gsto +"^000000 "+ getitemname( .@item ) +" in guild storage on all his character." ) ); close; } Check item ID in inventory, cart inventory, storage and gstorage of all player in the account of the player's name you write Can be improve ( my skills in SQL are 'NULL' lol)
  24. hmmm just this ? prontera,159,180,5 script hjkl 456,{ if ( !getskilllv(10000) ) { mes "your guild doesn't have lvl 1 approval"; close; } warp "prontera",0,0;// warp in your guild house ? end; } getskilllv(10000) check if the player have approval ( Skill ID 10000 ) and return the level of the skill if so
×
×
  • Create New...