Jump to content

JaranSwitch0101

Members
  • Posts

    59
  • Joined

Everything posted by JaranSwitch0101

  1. I'm used ragexe2019-08-21 and truly i don't know where i'm wrong... http:// My diff: 8 Custom Window Title 9 Disable 1rag1 type parameters (Recommended) 17 Enable Official Custom Fonts 18 Skip Service Selection Screen 19 Enable Title Bar Menu 23 Enable /who command (Recommended) 24 Fix Camera Angles (Recommended) 34 Enable /showname (Recommended) 35 Read Data Folder First 36 Read msgstringtable.txt (Recommended) 38 Remove Gravity Ads (Recommended) 39 Remove Gravity Logo (Recommended) 42 Skip Resurrection Button 44 Translate Client (Recommended) 46 Use Normal Guild Brackets (Recommended) 47 Use Ragnarok Icon 49 Enable Multiple GRFs (Recommended) 50 Skip License Screen 52 Use Custom Font 317 Ignore Quest Errors 64 @ Bug Fix (Recommended) 65 Load Custom lua file instead of iteminfo*.lub (Recommended) 71 Ignore Resource Errors 73 Remove Hourly Announce (Recommended) 76 Enforce Official Login Background 84 Remove Serial Display (Recommended) 86 Only First Login Background 90 Enable DNS Support (Recommended) 115 Enable Effect for all Maps [Experimental] 205 Enable Monster Tables 207 Resize Font 218 Show Exp Numbers 230 Always load Korea ExternalSettings lua file 231 Remove hardcoded address/port (Recommended) 232 Restore old login packet (Recommended) 234 Ignore Lua Errors 236 Enable Custom Player Skills [Experimental] 238 Enable Custom Mercenary Skills [Experimental] 240 Load custom ClientInfo file 244 Disable Cheat Defender Game Guard (Recommended) My Sclientinfo: <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <desc>Ragnarok Client Information</desc> <servicetype>korea</servicetype> <servertype>primary</servertype> <connection> <display>IonvioxathRO</display> <address>127.0.0.1</address> <port>6900</port> <version>55</version> <langtype>0</langtype> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading05.jpg</image> <image>loading06.jpg</image> <image>loading07.jpg</image> <image>loading08.jpg</image> <image>loading09.jpg</image> <image>loading10.jpg</image> <image>loading11.jpg</image> <image>loading12.jpg</image> <image>loading13.jpg</image> <image>loading14.jpg</image> <image>loading15.jpg</image> <image>loading16.jpg</image> <image>loading17.jpg</image> <image>loading18.jpg</image> <image>loading19.jpg</image> <image>loading20.jpg</image> <image>loading21.jpg</image> <image>loading22.jpg</image> <image>loading23.jpg</image> <image>loading24.jpg</image> <image>loading25.jpg</image> </loading> </connection> </clientinfo> Please,help...
  2. I really like two that's job but...i don't know how to do that i don't know how to do that because I know the server rathena already has those 2 jobs and for now it only works with new ragexe i really want to know how to make it work like custom job and the skills of those 2 professions can work with ragexe 20170614, Sadly, new ragexe cannot display Vietnamese http://
  3. This function will be in the form of posting notices auto count the number of targets that a player has hunted. After hunting the required number of hunting missions, it will notify the completion of the task. Code of Quest Board of Trons: //===== rAthena Script ======================================= //= tr0n's Questboard //===== By: ================================================== //= tr0n //===== Current Version: ===================================== //= 1.6.5 //===== 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 // 1.5.4 Added repeatable Quests // 1.6.4 Added party support // 1.6.5 Bug fixes for party support //============================================================ 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]"; mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" 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]"; mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" 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; } 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(.quest_repeat == 1){ 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; } } else{ if(getd(.@selection + "_collection_repeat") == 1){ mes "[^FF7700Questboard^000000]"; mes "You already did this quest."; mes "Please choose another one."; 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]"; mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" 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(.quest_repeat == 1){ 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; } } else{ if(getd(.@selection + "_hunting_repeat") == 1){ mes "[^FF7700Questboard^000000]"; mes "You already did this quest."; mes "Please choose another one."; 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]"; mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" 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."; if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount")); set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny"); getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]"); setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay; setd(currentquest$ + "_collection_repeat"),1; 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); } if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount")); set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny"); getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]"); setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay; setd(currentquest$ + "_hunting_repeat"),1; 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+"]")+")"; if(getcharid(1) != 0 && .party_support == 1){ getmapxy(.@map1$,.@x1,.@y1,0); set .@killerid, getcharid(3); set .@currentquest$, currentquest$; getpartymember getcharid(1),1; getpartymember getcharid(1),2; for(set .@j, 0; .@j < $@partymembercount; .@j++){ if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){ if(attachrid($@partymemberaid[.@j])){ if(h_run==1 && getcharid(3) != .@killerid && .@currentquest$ == currentquest$ && HP > 0){ getmapxy(.@map2$,.@x2,.@y2,0); if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){ if(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+.@currentquest$+"_huntingmob["+.@i+"]")) { 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+"]")+")"; } } } } } } attachrid(.@killerid); } } continue; } end; OnInit: function AddCollection; function AddHunting; //Activate/Deactivate quest categories (1 - activated, 0 - deactivated) set .collection, 1; set .hunting, 1; //Quest Delay (seconds) //24 hours = 86400 seconds set .quest_delay, 0; //Activate/Deactivate repeatable quests (1 - activated, 0 - deactivated) set .quest_repeat, 1; //Activate/Deactivate party support(1 - activated, 0 - deactivated) set .party_support, 1; //Max range for party support (+- x & y coordinations) set .party_range, 25; //Checks if quests are loaded (prevents out of index) if(.questsloaded==1) end; set .questsloaded, 1; //Add Collection Quests here (You can add as many required items as you want) //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...); //Add Hunting Quests here (You can add as many required mobs as you want) //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...); end; function AddCollection{ set .collectionquestcount,.collectionquestcount+1; setd ("." +.collectionquestcount+"_collectionname$", getarg(0)); setd ("." +.collectionquestcount+"_collectionmin", getarg(1)); setd ("." +.collectionquestcount+"_collectionmax", getarg(2)); setd ("." +.collectionquestcount+"_collectionprize", getarg(3)); setd ("." +.collectionquestcount+"_collectionamount", getarg(4)); setd ("." +.collectionquestcount+"_collectionzeny", getarg(5)); set .@argcount, 6; 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+"_huntingprize", getarg(3)); setd ("." +.huntingquestcount+"_huntingamount", getarg(4)); setd ("." +.huntingquestcount+"_huntingzeny", getarg(5)); set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp")); set .@argcount, 6; 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; } } Please help...
  4. It will automatically notify the number of monsters we kill, right?
  5. Love it... Hope see more npc fairy like this
  6. With your new client kro...Are you have full folder "Information" of Textures? I'm having trouble missing it ? If you have it...please,share it for me http://
  7. I never see this before...If someone have it,please...share it for me http://url images upload
  8. Thank you for your dedicated guidance,but...i think with ilusion of maps still lacking quite a lot http:// Can you share all ilusion of them? Please...
  9. I think just putting in grf data is okay... Why must add something to use?
  10. Hm... It happen with all maps from you ? http://
  11. Where i can get texture of this two map? http://
  12. I hope to know how to add navigation to find custom npc in maps? Please,help...
  13. When I saw this map, I had a melody of this song in my mind... [youtube]
  14. For only script Campfire,right? It's make script error when open my sever ? buit,Thanks for your suggestion! ?
  15. When @Emistry share it,I was very excited When i add system for my server,i don't know where i'm wrong? My npc.cpp,before add the source: http:// My npc.cpp after add the source: http:// My npc.hpp: http:// My script.inc: // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder /** * Custom Script Commands * Place the body of custom script commands in this file. * Format: * BUILDIN_FUNC(command_name) * { * <code>; * } **/ //BUILDIN_FUNC(example) //{ // ShowInfo("buildin_example: It works!\n"); // script_pushint(st,1); // return 0; //} /*========================================== * Duplicate any npc on live server * duplicatenpc "<Source NPC name>","<New NPC shown name>","<New NPC hidden name>","<mapname>",<map_x>,<map_y>,<dir>{, spriteid{, map_xs, map_ys}}}; *------------------------------------------*/ BUILDIN_FUNC(duplicatenpc) { int map_x = script_getnum(st, 6); int map_y = script_getnum(st, 7); int dir = script_getnum(st, 8); int spriteid, map_xs = -1, map_ys = -1, sourceid, type, mapid, i; const char *sourcename = script_getstr(st, 2); const char *new_shown_name = script_getstr(st, 3); const char *new_hidden_name = script_getstr(st, 4); const char *mapname = script_getstr(st, 5); char new_npc_name[24] = ""; struct npc_data *nd_source, *nd_target; if(script_hasdata(st, 10)) map_xs = (script_getnum(st, 10) < -1) ? -1 : script_getnum(st, 10); if(script_hasdata(st, 11)) map_ys = (script_getnum(st, 11) < -1) ? -1 : script_getnum(st, 10); if(map_xs == -1 && map_ys != -1) map_xs = 0; if(map_xs != - 1 && map_ys == -1) map_ys = 0; if(strlen(new_shown_name) + strlen(new_hidden_name) > NAME_LENGTH) { ShowError("buildin_duplicatenpc: New NPC shown name + New NPC hidden name is too long (max %d chars). (%s)\n", sourcename, NAME_LENGTH); script_pushint(st, 0); return SCRIPT_CMD_FAILURE; } nd_source = npc_name2id(sourcename); if(script_hasdata(st, 9)) spriteid = (script_getnum(st, 9) < -1) ? -1 : script_getnum(st, 9); else spriteid = nd_source->class_; if(nd_source == NULL) { ShowError("buildin_duplicatenpc: original npc not found for duplicate. (%s)\n", sourcename); script_pushint(st, 0); return SCRIPT_CMD_FAILURE; } sourceid = nd_source->bl.id; type = nd_source->subtype; mapid = map_mapname2mapid(mapname); if(mapid < 0) { ShowError("buildin_duplicatenpc: target map not found. (%s)\n", mapname); script_pushint(st, 0); return SCRIPT_CMD_FAILURE; } CREATE(nd_target, struct npc_data, 1); strcat(new_npc_name, new_shown_name); strncat(new_npc_name, "#", 1); strncat(new_npc_name, new_hidden_name, strlen(new_hidden_name)); safestrncpy(nd_target->name, new_npc_name , sizeof(nd_target->name)); safestrncpy(nd_target->exname, new_npc_name, sizeof(nd_target->exname)); nd_target->bl.prev = nd_target->bl.next = NULL; nd_target->bl.m = mapid; nd_target->bl.x = map_x; nd_target->bl.y = map_y; nd_target->bl.id = npc_get_new_npc_id(); nd_target->class_ = spriteid; nd_target->speed = 200; nd_target->src_id = sourceid; nd_target->bl.type = BL_NPC; nd_target->subtype = (enum npc_subtype)type; switch(type) { case NPCTYPE_SCRIPT: nd_target->u.scr.xs = map_xs; nd_target->u.scr.ys = map_ys; nd_target->u.scr.script = nd_source->u.scr.script; nd_target->u.scr.label_list = nd_source->u.scr.label_list; nd_target->u.scr.label_list_num = nd_source->u.scr.label_list_num; break; case NPCTYPE_SHOP: case NPCTYPE_CASHSHOP: case NPCTYPE_ITEMSHOP: case NPCTYPE_POINTSHOP: case NPCTYPE_MARKETSHOP: nd_target->u.shop.shop_item = nd_source->u.shop.shop_item; nd_target->u.shop.count = nd_source->u.shop.count; break; case NPCTYPE_WARP: if( !battle_config.warp_point_debug ) nd_target->class_ = JT_WARPNPC; else nd_target->class_ = JT_GUILD_FLAG; nd_target->u.warp.xs = map_xs; nd_target->u.warp.ys = map_ys; nd_target->u.warp.mapindex = nd_source->u.warp.mapindex; nd_target->u.warp.x = nd_source->u.warp.x; nd_target->u.warp.y = nd_source->u.warp.y; nd_target->trigger_on_hidden = nd_source->trigger_on_hidden; break; } map_addnpc(mapid, nd_target); status_change_init(&nd_target->bl); unit_dataset(&nd_target->bl); nd_target->ud.dir = dir; npc_setcells(nd_target); map_addblock(&nd_target->bl); if(spriteid >= 0) { status_set_viewdata(&nd_target->bl, nd_target->class_); clif_spawn(&nd_target->bl); } strdb_put(npcname_db, nd_target->exname, nd_target); if(type == NPCTYPE_SCRIPT) { for (i = 0; i < nd_target->u.scr.label_list_num; i++) { char* lname = nd_target->u.scr.label_list[i].name; int pos = nd_target->u.scr.label_list[i].pos; if ((lname[0] == 'O' || lname[0] == 'o') && (lname[1] == 'N' || lname[1] == 'n')) { struct event_data* ev; char buf[NAME_LENGTH*2+3]; snprintf(buf, ARRAYLENGTH(buf), "%s::%s", nd_target->exname, lname); CREATE(ev, struct event_data, 1); ev->nd = nd_target; ev->pos = pos; if(strdb_put(ev_db, buf, ev)) ShowWarning("npc_parse_duplicate : duplicate event %s (%s)\n", buf, nd_target->name); } } for (i = 0; i < nd_target->u.scr.label_list_num; i++) { int t = 0, k = 0; char *lname = nd_target->u.scr.label_list[i].name; int pos = nd_target->u.scr.label_list[i].pos; if (sscanf(lname, "OnTimer%d%n", &t, &k) == 1 && lname[k] == '\0') { struct npc_timerevent_list *te = nd_target->u.scr.timer_event; int j, k = nd_target->u.scr.timeramount; if (te == NULL) te = (struct npc_timerevent_list *)aMalloc(sizeof(struct npc_timerevent_list)); else te = (struct npc_timerevent_list *)aRealloc( te, sizeof(struct npc_timerevent_list) * (k+1) ); for (j = 0; j < k; j++) { if (te[j].timer > t) { memmove(te+j+1, te+j, sizeof(struct npc_timerevent_list)*(k-j)); break; } } te[j].timer = t; te[j].pos = pos; nd_target->u.scr.timer_event = te; nd_target->u.scr.timeramount++; } } nd_target->u.scr.timerid = INVALID_TIMER; } script_pushint(st, 1); return SCRIPT_CMD_SUCCESS; } /*========================================== * Remove any npc duplicate on live server * duplicateremove "<NPC name>"; *------------------------------------------*/ BUILDIN_FUNC(duplicateremove) { struct npc_data *nd; if(script_hasdata(st, 2)) { nd = npc_name2id(script_getstr(st, 2)); if(nd == NULL) { script_pushint(st, -1); return SCRIPT_CMD_FAILURE; } } else nd = (struct npc_data *)map_id2bl(st->oid); if(!nd->src_id) npc_unload_duplicates(nd); else npc_unload(nd,true); script_pushint(st, 1); return SCRIPT_CMD_SUCCESS; } My script_def.inc: // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder /** * Custom Script Commands * Place the definition of custom script commands in this file. * Format: * BUILDIN_DEF(command_name,"parameters"), **/ //BUILDIN_DEF(example,""), BUILDIN_DEF(duplicatenpc, "ssssiii???"), BUILDIN_DEF(duplicateremove, "?"), My item_db: 902,Tree_Root,Tree Root,2,12,,10,,,,,,,,,,,,,{ callfunc("func_UpdateCampFire", rand(1, 5), 30, rand(1,8)); },{},{} 7035,Matchstick,Matchstick,2,100,,10,,,,,,,,,,,,,{ callfunc("func_CreateCampFire", rand(2, 5), 60, rand(1,10)); },{},{} 7850,Wooden_Block_,Wooden Block,2,20,,100,,,,,,,,,,,,,{ callfunc("func_UpdateCampFire", rand(3, 10), 60, rand(5,15)); },{},{} When I build for src, I don't see any problems except this when opening the server ... http:// and it doesn't work at all without seeing any error messages ? Please help,I really like this system
  16. Thanks! I waited this monsters so long time http://
  17. It's nice! Can you add a description line for each mission before performing monster hunting missions? ? It will be more perfect if there are items hunting... ?
  18. Can add functions like type ... When it is time to publish the results, it will notify the entire server of the result and the winner's name. Rewards will automatically transfer directly to the winner's mailbox. You can do it? And when the player wants to meet npc confirm the result, it will report the result and the lucky winner If you have these extra features, than the NPC Raffle will be awesome !! http://
  19. Can you do a monster hunting minigame in a short time? and if the player fails a certain number of times or runs out of time according to the rules, that player loses !!
  20. I just want to know how to add slash effects for Custom weapons Like other normal swords... Please,help...
  21. Do you have model moa and texture moa of this map?
×
×
  • Create New...