-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
Custom_Maps Google is your friend.
-
Requesting for a simple Mob Hunt script..
Capuche replied to chromus28's question in Script Requests
http://rathena.org/board/topic/60376-tr0ns-questboard-144/ -
src/custom Are you using rAthena ?
-
- script atcmd_example -1,{ OnInit: bindatcmd "question",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: warp "prontera",150,150; createchatroom( getcharid(3), "Question", "",5 ); sit; end; } Add in src/custom/script.inc // createchatroom( <char|account|name>, <title>, <password>, {<limit>, <type>} ); // password : only enabled for type 0 // limit[ 1,20 ], 1 by default // type : 1 -> public, 0 -> private BUILDIN_FUNC(createchatroom) { int len = strlen( script_getstr(st,3) ); int limit = 1; char title[ CHATROOM_TITLE_SIZE ]; char password[ CHATROOM_PASS_SIZE ]; bool type = 1;// chat public by default TBL_PC *sd = NULL; if ( script_isstring(st,2) ) sd = map_nick2sd( script_getstr(st,2) ); else { int id = script_getnum(st,2); sd = map_charid2sd(id) ? map_charid2sd(id) : map_id2sd(id); } if ( sd == NULL ) { ShowWarning( "createchatroom : none player attached.\n" ); return 0; } if ( (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM) || (battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 4 ) || npc_isnear(&sd->bl) ) return 0; if ( len > CHATROOM_TITLE_SIZE || strlen( script_getstr(st,4) ) > CHATROOM_PASS_SIZE ) return 0; if ( sd->chatID != 0 ) return 0; safestrncpy( title, script_getstr(st,3), min( len+1,CHATROOM_TITLE_SIZE ) ); safestrncpy( password, script_getstr(st,4), CHATROOM_PASS_SIZE ); if ( script_hasdata(st,5) ) { int tmp = script_getnum(st,5); if ( tmp > limit && tmp <= 20 ) limit = tmp; else if ( tmp > 20 ) limit = 20; } if ( script_hasdata(st,6) && script_getnum(st,6) == 0 ) type = 0; chat_createpcchat( sd, title, password, limit, type ); chat_changechatstatus( sd, title, password, limit, type ); return 0; } and in src/custom/script_def.inc BUILDIN_DEF(createchatroom,"vss??"), then recompile
-
Drop rate max HP,dex no cast,custom drop rate card
Capuche replied to Scythero's question in Database Support
Change the max HP : conf/battle/player.conf#L74 -
The delay is because of the update delay of char.last_map try - script atcmd_examplere -1,{ OnInit: bindatcmd "recallmap",strnpcinfo(3)+"::OnAtcommand",60,60; end; OnAtcommand: getmapxy .map_self$, .x_self, .y_self, 0; .myname$ = strcharinfo(0); .count = 0; addrid 0; if ( strcharinfo(3) == .map_self$ && strcharinfo(0) != .myname$ ) { message strcharinfo(0), "You have been recalled by "+ .myname$ +"."; warp .map_self$, .x_self, .y_self; .count++; } if ( strcharinfo(0) != .myname$ ) end; sleep2 10; if ( .count == 0 ) message strcharinfo(0), "There is none player on this map except you."; else message strcharinfo(0), .count +" player(s) recalled."; end; }
-
prontera,200,250,10,10 monster Poring 1002,10,10000,11000,0 spawn the monster in a rectangle of 10x10 (I mean radius) centered at 200,250 190,260 -------------------------210,260 | | | | | 200,250 | | | | | 190,240 -------------------------210,240 @Patskie Yes it would be an alternative. But you can get rid of donpcevent - script Sample -1,{ OnKill: sleep 1 * 60 * 1000; OnInit: monster "prontera",0,0,"Poring",1002,1,strnpcinfo(1)+"::OnKill"; end; }
-
@Patskie Your script will spawn a monster every min regardless the previous monster, alive or not. @Phenex Check your script : X2 = X2 (horizontal) rectangle Y2 = Y2 (vertical) rectangle It spawns the monsters in a rectangle of 193x188 centered on x,y
-
https://github.com/rathena/rathena/blob/master/npc/custom/item_signer.txt
-
another option should be to use bindatcmd - script atcmd_example -1,{ OnInit: bindatcmd "go",strnpcinfo(3)+"::OnAtcommand",0,99; end; OnAtcommand: if ( .@atcmd_parameters$[0] == "home" ) { message "You are warped to prontera."; warp "prontera",150,150; } else atcommand "@go "+ implode( .@atcmd_parameters$," " ); end; } but I think Emistry's suggestion is better
-
//===== rAthena Script ======================================= //= tr0n's Questboard //===== By: ================================================== //= tr0n //===== Current Version: ===================================== //= 1.4.4 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Easily add collection and hunting quests. //===== Additional Comments: ================================= // 1.0.0 Release // 1.1.0 Added zeny reward // 1.2.0 Rewrote checkmob and killcounter // 1.3.1 Added level restriction // 1.3.4 Added Reward Item Amount // 1.4.4 Added Quest delay //============================================================ prontera,129,215,5 script Questboard 857,{ if(c_run==1){ mes "[^FF7700Questboard^000000]"; mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000"; mes "--------------------------------"; for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); set .@j,.@j+2) { mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000"; } mes "--------------------------------"; mes "[Reward]"; for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionprize")); set .@j,.@j+1) mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize["+.@j+"]"))?getitemname(getd("." +currentquest$+"_collectionprize["+.@j+"]"))+" - "+getd("." +currentquest$+"_collectionamount["+.@j+"]")+" ea.^000000":"Nothing^000000"); mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000"; mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000"; mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000"; next; if(select("Finish:Abort") == 2){ mes "[^FF7700Questboard^000000]"; mes "Quest aborted."; set currentquest$, ""; set c_run, 0; close; } goto L_checkitems; } if(h_run==1){ mes "[^FF7700Questboard^000000]"; mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000"; mes "--------------------------------"; for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingmob")); set .@j,.@j+2) { set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]"); mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000"; } mes "--------------------------------"; mes "[Reward]"; for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingprize")); set .@j,.@j+1) mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize["+.@j+"]"))?getitemname(getd("." +currentquest$+"_huntingprize["+.@j+"]"))+" - "+getd("." +currentquest$+"_huntingamount["+.@j+"]")+" ea.^000000":"Nothing^000000"); mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000"; mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000"; mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000"; next; if(select("Finish:Abort") == 2){ mes "[^FF7700Questboard^000000]"; mes "Quest aborted."; for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]"); setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0); } set currentquest$, ""; set h_run, 0; close; } goto L_checkmobs; } L_questmenu: mes "[^FF7700Questboard^000000]"; mes "Select category:"; next; switch(select((.collection)?"Collection Quests":"", (.hunting)?"Hunting Quests":"", "Exit")) { case 1: set .@collectmenu$, ""; for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1) { if (.@i) set .@collectmenu$,.@collectmenu$+":"; set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$"); } set .@selection,select(.@collectmenu$); if(gettimetick(2) < getd(.@selection + "_collection_delay")){ set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2); mes "[^FF7700Questboard^000000]"; if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again."; if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again."; mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again."; close; } mes "[^FF7700Questboard^000000]"; mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000"; mes "--------------------------------"; for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2) { mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000"; } mes "--------------------------------"; mes "[Reward]"; for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionprize")); set .@j,.@j+1) mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize["+.@j+"]"))?getitemname(getd("." +.@selection+"_collectionprize["+.@j+"]"))+" - "+getd("." +.@selection+"_collectionamount["+.@j+"]")+" ea.^000000":"Nothing^000000"); mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000"; mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000"; mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000"; next; if(select("Accept:Decline") == 2){ close; } if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")) { mes "[^FF7700Questboard^000000]"; mes "Quest accepted."; set c_run, 1; set currentquest$, .@selection; close; } else { mes "[^FF7700Questboard^000000]"; mes "You don't have the required"; mes "level to do this quest."; close; } case 2: set .@huntmenu$, ""; for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1) { if (.@i) set .@huntmenu$,.@huntmenu$+":"; set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$"); } set .@selection,select(.@huntmenu$); if(gettimetick(2) < getd(.@selection + "_hunting_delay")){ set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2); mes "[^FF7700Questboard^000000]"; if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again."; if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again."; mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again."; close; } mes "[^FF7700Questboard^000000]"; mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000"; mes "--------------------------------"; for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2) { mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000"; } mes "--------------------------------"; mes "[Reward]"; for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingprize")); set .@j,.@j+1) mes "Item: ^0000FF"+((getd("." + .@selection +"_huntingprize["+.@j+"]"))?getitemname(getd("." +.@selection+"_huntingprize["+.@j+"]"))+" - "+getd("." +.@selection+"_huntingamount["+.@j+"]")+" ea.^000000":"Nothing^000000"); mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000"; mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000"; mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000"; next; if(select("Accept:Decline") == 2){ close; } if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")) { mes "[^FF7700Questboard^000000]"; mes "Quest accepted."; set h_run, 1; set currentquest$, .@selection; close; } else { mes "[^FF7700Questboard^000000]"; mes "You don't have the required"; mes "level to do this quest."; close; } case 3: close; } L_checkitems: for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2) { if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){ set .@checkitem,.@checkitem+2; } } if(.@checkitem<getarraysize(getd("."+currentquest$+"_collectionitem"))){ mes "[^FF7700Questboard^000000]"; mes "You don't have everything."; close; } for( set .@delcount,0; .@delcount < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@delcount,.@delcount+2) { delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]"); } mes "[^FF7700Questboard^000000]"; mes "Congratulation! Here is your Reward."; for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionprize")); set .@j,.@j+1) if(getd("." +currentquest$+"_collectionprize["+.@j+"]")!=0) getitem(getd("." +currentquest$+"_collectionprize["+.@j+"]"),getd("." +currentquest$+"_collectionamount["+.@j+"]")); set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny"); getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]"); setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay; set currentquest$, ""; set c_run, 0; close; L_checkmobs: set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2); for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]"); if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){ set .@checkmonster, .@checkmonster+1; if(.@checkmonster==.@goal){ goto L_checkmobs2; } continue; } goto L_checkmobs2; } L_checkmobs2: if(.@checkmonster<.@goal){ mes "[^FF7700Questboard^000000]"; mes "You didn't kill everything."; close; } mes "[^FF7700Questboard^000000]"; mes "Congratulation! Here is your Reward."; for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]"); setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0); } for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingprize")); set .@j,.@j+1) if(getd("." +currentquest$+"_huntingprize["+.@j+"]")!=0) getitem(getd("." +currentquest$+"_huntingprize["+.@j+"]"),getd("." +currentquest$+"_huntingamount["+.@j+"]")); set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny"); getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]"); setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay; set currentquest$, ""; set h_run, 0; close; OnNPCKillEvent: if(h_run!=1) end; for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){ if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]"); if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")>=getd("."+currentquest$+"_huntingmob["+.@i+"]")) end; setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1); dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")"; end; } continue; } end; OnInit: function AddCollection; function AddHunting; function CollectionReward; function HuntingReward; //Activate/Deactive quest categories here set .collection, 1; set .hunting, 1; //Quest Delay (seconds) //24 hours = 86400 seconds set .quest_delay, 0; //Checks if quests are loaded (prevents out of index) if(.questsloaded==1) end; set .questsloaded, 1; //Add Collection Quests here //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...); //CollectionReward(<Reward|Item ID>,<Reward|Item Amount>,...); //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...); //CollectionReward(<Reward|Item ID>,<Reward|Item Amount>,...); //Add Hunting Quests here //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...); //HuntingReward(<Reward|Item ID>,<Reward|Item Amount>,...); end; function CollectionReward { .@count = getargcount(); while( .@i < .@count ) { setd ("." +.collectionquestcount+"_collectionprize["+ (.@i/2) +"]", getarg(.@i)); setd ("." +.collectionquestcount+"_collectionamount["+ (.@i/2) +"]", getarg(.@i+1)); .@i += 2; } } function HuntingReward { .@count = getargcount(); while( .@i < .@count ) { setd ("." +.huntingquestcount+"_huntingprize["+ (.@i/2) +"]", getarg(.@i)); setd ("." +.huntingquestcount+"_huntingamount["+ (.@i/2) +"]", getarg(.@i+1)); .@i += 2; } } function AddCollection { set .collectionquestcount,.collectionquestcount+1; setd ("." +.collectionquestcount+"_collectionname$", getarg(0)); setd ("." +.collectionquestcount+"_collectionmin", getarg(1)); setd ("." +.collectionquestcount+"_collectionmax", getarg(2)); setd ("." +.collectionquestcount+"_collectionzeny", getarg(3)); set .@argcount, 4; set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp")); setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount, .@argcount+2; while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) { set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem")); setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount,.@argcount+2; } return; } function AddHunting { set .huntingquestcount,.huntingquestcount+1; setd ("." +.huntingquestcount+"_huntingname$", getarg(0)); setd ("." +.huntingquestcount+"_huntingmin", getarg(1)); setd ("." +.huntingquestcount+"_huntingmax", getarg(2)); setd ("." +.huntingquestcount+"_huntingzeny", getarg(3)); set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp")); set .@argcount, 4; setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount)); setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount, .@argcount+2; while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) { set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob")); setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount, .@argcount+2; } return; } }
-
Give items following the base class (baseclass acolyte = sura, priest, high priest etc...) prontera,150,150,5 script iunhouihuo 456,{ if( freebie_item ) end; switch( BaseClass ) { case Job_Novice: setarray .@item,501,2,503,4; break; case Job_Swordman: setarray .@item,501,2,503,4; break; case Job_Mage: setarray .@item,501,2,503,4; break; case Job_Archer: setarray .@item,501,2,503,4; break; case Job_Acolyte: setarray .@item,501,2,503,4; break; case Job_Merchant: setarray .@item,501,2,503,4; break; case Job_Thief: setarray .@item,501,2,503,4; break; case Job_SuperNovice: setarray .@item,501,2,503,4; break; case Job_Gunslinger: setarray .@item,501,2,503,4; break; case Job_Ninja: setarray .@item,501,2,503,4; break; default: } .@size = getarraysize( .@item ); for ( .@i = 0; .@i < .@size; .@i += 2 ) getitem .@item[.@i], .@item[.@i+1]; freebie_item = 1; end; }
-
I suggest you 2 options : make a duplicate of the slaves in your db mob_db without drop remove the autocast (maybe on a specific map) of the ring of ifrit
-
something like this http://rathena.org/board/topic/74607-dedicated-npc/
-
- script atcmd_example -1,{ OnInit: bindatcmd "question",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: warp "prontera",150,150; end; }
-
AnniRuru Limit skull drop need help and changing
Capuche replied to Diss's question in Scripting Support
OnPCKillEvent: - if ( killedrid == getcharid(3) ) end; + if ( killedrid == getcharid(3) || strcharinfo(3) != "<map name>" ) end; -
This code compile the menu, to display the menu use select like in this part for(set .@i,0; .@i<.@sizeacc; set .@i,.@i+1) // index start to 0 set .@menu$, .@menu$+":"+.@aid[.@i]; set .@Select,select( .@menu$ ) - 1;// display the compiled menu
-
- script atcmd_example -1,{ OnInit: bindatcmd "ip",strnpcinfo(3)+"::OnAtcommand",60,60; end; OnAtcommand: if ( .@atcmd_numparameters == 0 ) dispbottom "Please enter an ip"; else { .@size = query_sql( "select name from `char` left join login on `char`.account_id = login.account_id where online = 1 and last_ip = '"+ escape_sql( .@atcmd_parameters$[0] ) +"'", .@name$ ); if ( .@size ) { dispbottom "Character online with this ip:"; while( .@i < .@size ) { dispbottom .@name$[.@i]; .@i++; } } else dispbottom "None character with this ip found."; } end; } @ip <your ip>
-
oO I didn't see the <number of people> option prontera,155,182,2 script onoi 75,{ end; OnInit: waitingroom "Party - Waiting Room",20,strnpcinfo(3)+"::OnStart",1; end; OnTimer2000: OnStart: if ( getmapusers( "new_1-2" ) == 0 ) { warpwaitingpc "new_1-2",0,0,1; if ( $@warpwaitingpcnum ) announce "The player "+ rid2name( $@warpwaitingpc[0] ) +" was teleported to the event room!",bc_blue|bc_all; if ( getwaitingroomstate(0) == 0 ) { stopnpctimer; end; } } initnpctimer; end; } thanks for remind me
-
prontera,155,182,2 script onoi 75,{ end; OnInit: waitingroom "Party - Waiting Room",20,strnpcinfo(3)+"::OnStart",1; end; OnTimer2000: OnStart: .@size = getwaitingroomstate(40); if ( getmapusers( "new_1-2" ) == 0 ) { attachrid $@waitingaccountid[0]; warp "new_1-2",0,0; announce "The player "+ strcharinfo(0) +" was teleported to the event room!",bc_blue|bc_all; .@size--; } announce .@size,0; if ( .@size > 0 ) initnpctimer; else stopnpctimer; end; } apply the following diff and recompile. With this you retrieve the account id of the player in the waitingroom Index: script.c =================================================================== --- script.c (revision 17690) +++ script.c (working copy) @@ -10525,7 +10525,8 @@ { struct npc_data *nd; struct chat_data *cd; - int type; + int type, i; + TBL_PC* sd; type = script_getnum(st,2); if( script_hasdata(st,3) ) @@ -10550,6 +10551,13 @@ case 16: script_pushstrcopy(st, cd->npc_event);break; case 32: script_pushint(st, (cd->users >= cd->limit)); break; case 33: script_pushint(st, (cd->users >= cd->trigger)); break; + case 40: + for( i = 0; i < cd->users; i++ ) { + sd = cd->usersd[i]; + mapreg_setreg(reference_uid(add_str("$@waitingaccountid"),i), sd->bl.id); + } + script_pushint(st, i); + break; default: script_pushint(st, -1); break; } return 0;
-
prontera,156,178,3 script zqscdf 56,{ if ( mobcount( "prontera","all" ) ) end; callsub L_spawn, ( @roundihub+1 ); warp .next_map$,0,0; end; L_spawn: .@round = getarg(0) +1; .@size = getarraysize( getd( ".round"+ .@round ) ); if ( .@size == 0 ) return; for ( ; .@i < .@size; .@i += 2 ) monster "prontera",0,0,"--ja--", getd( ".round"+ .@round +"["+ .@i +"]" ) , getd( ".round"+ .@round +"["+ (.@i+1) +"]" ) ,""; end; oninit: setarray .round1, 1002,5, 1003,4;// modid, amount setarray .round2, 1002,5, 1003,4;// modid, amount setarray .round3, 1002,5, 1003,4;// modid, amount setarray .round4, 1002,5, 1003,4;// modid, amount .next_map$ = "geffen"; end; onPCLoadMapEvent: @roundihub = 0; } prontera mapflag loadevent
-
http://www.eathena.ws/board/index.php?showtopic=243923
-
prontera,156,178,3 script Check ID 952,{ //input character name input .@Name$; set .@sizeacc, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip(getcharid(3, .@name$))+"'",.@aid); // no need freeloop set .@menu$,""; for(set .@i,0; .@i<.@sizeacc; set .@i,.@i+1) // index start to 0 set .@menu$, .@menu$+":"+.@aid[.@i]; set .@Select,select( .@menu$ ) - 1; set .@sizechar, query_sql("SELECT `name` FROM `char` WHERE `account_id` = '"+.@aid[.@Select]+"'",.@charname$); //can view the char name list by account selected set .@menu$,""; for(set .@i,0; .@i<.@sizechar; set .@i,.@i+1) set .@menu$, .@menu$+":"+.@charname$[.@i]; // you must display the name close; }
-
Toesty's WoE Controller for rAthena r17435
Capuche replied to Lord Ganja's question in Script Requests
http://rathena.org/board/topic/57377-toastys-woe-controller/