Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. input @map$; if ( getmapusers( @map$ ) == -1 ) { mes "Invalid map."; close; } setmapflag @map$,mf_noskill; There is a mistake in L_End: .count = 0; announce "All special zombies are dead. Apocalypse has ended.", 0; killmonster @2map$, strnpcinfo(0)+"::OnCorrectKill"; killmonster @2map$, strnpcinfo(0)+"::OnWrongKill"; end; @2map$ is defined for the gm, null for player
  2. Capuche

    @AutoTrade

    Maybe coz of this ? Mapflag#autotrade
  3. Hmm yeah so replace the previous like I said + then replace prontera,159,165,5 script red side 100,{ end; OnInit: waitingroom "Facção Vermelha", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" ); end; } prontera,163,165,5 script blue side 100,{ end; OnInit: waitingroom "Facção Azul", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" ); end; } by prontera,159,165,5 script red side 100,{ end; OnInit: waitingroom "Facção Vermelha", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1; end; } prontera,163,165,5 script blue side 100,{ end; OnInit: waitingroom "Facção Azul", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1; end; }
  4. Anakid's script have some error.. but make your choice
  5. - shop falseshop -1,909:-1 prontera,155,160,5 script dffddf 56,{ callshop "falseshop",1; npcshopattach "falseshop"; end; OnBuyItem: query_sql "select `pontos` from `char` where `char_id` = "+ getcharid(0), .@pontos; while( @bought_nameid[.@j] ) { for ( .@i = 0; .@i < .size_shop; .@i += 2 ) if ( .item_shop[.@i] == @bought_nameid[.@j] ) break; .@amount = .@amount + @bought_quantity[.@j] * .item_shop[.@i+1]; .@j++; } if ( .@amount > .@pontos ) { dispbottom "You need "+ .@amount +" point(s) and you have "+ .@pontos +" point(s)."; end; } query_sql "update `char` set `pontos` = ( `pontos` - "+ .@amount +" ) where `char_id` = "+ getcharid(0); for ( .@i = 0; .@i < getarraysize( @bought_nameid ); .@i++ ) getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "You use "+ .@amount +" point(s). "+ .@pontos +" point(s) remains."; end; OnInit: setarray .item_shop, 7447,5, 7448,6; // <Item ID>, <amount points required> .size_shop = getarraysize( .item_shop ); npcshopdelitem "falseshop",909; while( .@i < .size_shop ) { npcshopadditem "falseshop", .item_shop[.@i], .item_shop[.@i+1] ; .@i += 2; } }
  6. Player get some item killing the treasure chest like in the castle monster "ordeal_1-1",231,250,"Treasure Box",1324,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",234,247,"Treasure Box",1328,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",237,244,"Treasure Box",1332,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",240,241,"Treasure Box",1336,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",243,238,"Treasure Box",1340,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",246,235,"Treasure Box",1344,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",249,232,"Treasure Box",1348,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",252,229,"Treasure Box",1352,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",249,241,"Treasure Box",1356,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",240,249,"Treasure Box",1360,1,strnpcinfo(0)+"::Onboxdead"; 1324 : ID of the monster. etc.. Change the drop of the monster
  7. // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); prontera,150,150,0 script Test 123,{ query_sql "select `last_ip`, `newbie` from `login` where `last_ip` in (SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) +") having `newbie` = max(`newbie`) limit 1", .@last_ip$, .@tmp; if ( .@tmp ) { mes "I'm sorry, the rewards are exclusively for new players."; close; } mes "Welcome! Here are some free gifts"; mes "for newcomers:"; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) mes .reward[.@i+1] + " x " + getitemname(.reward[.@i]); close2; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) getitem .reward[.@i], .reward[.@i+1]; query_sql "update `login` set `newbie` = 1 WHERE `last_ip`= '" + .@last_ip$ + "'"; end; OnInit: setarray .reward, 671,100; // Rewards: <item id>,<item amount> .size = getarraysize( .reward ); } nb. setarray .671,100; // Rewards: <item id>,<item amount> was wrong
  8. Sample prontera,150,160,5 script sdoi 456,{ if ( Class == Job_Lord_Knight && BaseLevel == 99 && JobLevel == 70 && countitem( 7097 ) >= 100 && countitem( 7265 ) >= 20 ) { jobchange Job_Rune_Knight_T; delitem 7097, 100; delitem 7265, 20; } end; }
  9. Capuche

    Emperium's HP

    No you need a source mod
  10. Replace if ( getwaitingroomstate( 0, "red side" ) < .minplayer2start || getwaitingroomstate( 0, "blue side" ) < .minplayer2start ) end; by if ( getwaitingroomstate( 0, "red side" ) < .minplayer2start || getwaitingroomstate( 0, "blue side" ) < .minplayer2start ) { announce "BG: "+ getwaitingroomstate( 0, "red side" ) +"/"+ .minplayer2start +" Red team. "+ getwaitingroomstate( 0, "blue side" ) +"/"+ .minplayer2start +" Blue team.", 0; end; }
  11. update `char` set `wotrank` = 0
  12. Try this one prontera,155,169,5 script sdfgddhj 56,{ if ( countitem( 607 ) < .num_req ) { dispbottom "I need "+ .num_req +" "+ getitemname( 607 ) +" to gamble."; end; } else if ( select( "Gamble", "Leave" ) -1 ) end; set .@r, rand( .min_stat,.max_stat ); for ( set .@i, 13; .@i < 19; set .@i, .@i +1 ) statusup2 .@i, .@r; dispbottom "You got +"+ .@r +" allstats"; end; OnInit: set .num_req, 1; // number item 607 required to gamble set .min_stat, 1; // min allstats set .max_stat, 200; // max end; }
  13. Just delete the addtimer in preview npc and the view is 'permanent' (stay on the session if changelook with atcommand, permanent if changelook with npc command)
  14. The file's name is agit_template on eathena. Under OnAgitBreak: add if ( strcharinfo(3) == "Your Castle Map Name" ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); and replace "Your Castle Map Name" by the map name of the castle
  15. Don't forget ` in the query, sometimes that make an issue mes "Ok, this is Ranking WoT[TOP 10]"; next; query_sql "SELECT `name`, `wotrank` FROM `char` where `wotrank` != 0 ORDER BY `wotrank` DESC LIMIT 10", .@name$, .@charwot; if ( .@charwot == 0 ) { dispbottom "The ranking is empty."; close; } dispbottom "Ranking WOT [TOP 10]"; dispbottom " "; dispbottom "Player < x > Position"; dispbottom " "; for(set .@i,0; .@i<=9; set .@i, .@i+1 ) { dispbottom "["+(.@i+1)+"] < x > "+ .@name$[.@i] +" < x > "+ @charwot[.@i] +""; } close;
  16. Don't remove the content of you first post otherwise your topic is unreadable for other member.
  17. Capuche

    Dispell

    Another way : kill the player xD prontera,150,160,5 script jinuho 56,{ mes "enter in pvp ?"; next; if ( select( "Yes", "No" ) == 1 ) { percentheal -100,-100; // kill the player => remove status warp "prontera",0,0; // warp to your pvp map percentheal 100,100; // heal } end; }
  18. Capuche

    Dispell

    @Emistry You misread he wants to remove the buffs when player enters @SpongeBOB sc_end -1; dispell all skill
  19. You can't check if a monster drop an item when killed by script command only, you need a source mod for this
  20. You can add it anywhere in npc folder. Common spawn monster are loaded in trunk/npc/mobs/
  21. Read this tutorial : Basic_Scripting
  22. I'm not stuck anymore with the fix.. but the server take 2-5 secs to initiate the value
  23. @top_id, @top_name$; @top_id is a temporary variable attached to the player. With OnMinute, there is none player attached to the script. Change to .@top_id, .@top_name$;
  24. Change sleep 1; to sleep2 1; otherwise the rid is detached
  25. The player must be offline for this otherwise the variable is not necessarly reset query_sql "DELETE FROM `global_reg_value` WHERE `str`='#variable'";
×
×
  • Create New...