- Timestamp:
- 07/03/08 02:59:16 (17 years ago)
- Location:
- src
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
src/common/mmo.h
r22 r23 31 31 #define MAX_FAME 1000000000 32 32 #define MAX_CART 100 33 #define MAX_SKILL 1600 // Bumped to 1100 for new quest skills, will need to further increase one day... [DracoRPG]33 #define MAX_SKILL 1600 //1600 now, for necromancer skills overstepping bounds. 34 34 #define GLOBAL_REG_NUM 96 35 35 #define ACCOUNT_REG_NUM 64 -
src/map/npc.c
r1 r23 783 783 int npc_touch_areanpc2(struct mob_data *md) 784 784 { 785 int i, m = md->bl.m, x = md->bl.x, y = md->bl.y ;785 int i, m = md->bl.m, x = md->bl.x, y = md->bl.y, id; 786 786 char eventname[NAME_LENGTH*2+3]; 787 787 struct event_data* ev; … … 827 827 break; // No OnTouchNPC Event 828 828 md->areanpc_id = map[m].npc[i]->bl.id; 829 id = md->bl.id; // Stores Unique ID 829 830 run_script(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id); 831 if( map_id2md(id) == NULL ) return 1; // Not Warped, but killed 830 832 break; 831 833 } … … 2062 2064 switch(nd->subtype) 2063 2065 { 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2066 case WARP: 2067 xs = nd->u.warp.xs; 2068 ys = nd->u.warp.ys; 2069 break; 2070 case SCRIPT: 2071 xs = nd->u.scr.xs; 2072 ys = nd->u.scr.ys; 2073 break; 2074 default: 2075 return; // Other types doesn't have touch area 2074 2076 } 2075 2077 … … 2625 2627 else if (!strcmpi(w3,"guildlock")) 2626 2628 map[m].flag.guildlock=state; 2627 else if (!strcmpi(w3,"hostile"))2628 map[m].flag.hostile=state;//Sketchy2629 2629 else 2630 2630 ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); … … 2900 2900 "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" 2901 2901 "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" 2902 "\t-'"CL_WHITE"%d"CL_RESET"' Mobsets\n"2902 "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" 2903 2903 "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" 2904 2904 "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", … … 3011 3011 "\t-'"CL_WHITE"%d"CL_RESET"' Shops\n" 3012 3012 "\t-'"CL_WHITE"%d"CL_RESET"' Scripts\n" 3013 "\t-'"CL_WHITE"%d"CL_RESET"' Mobsets\n"3013 "\t-'"CL_WHITE"%d"CL_RESET"' Spawn sets\n" 3014 3014 "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n" 3015 3015 "\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n", -
src/map/script.c
r1 r23 329 329 MF_NOCHAT, 330 330 MF_NOEXPPENALTY, 331 MF_GUILDLOCK, 332 MF_HOSTILE 331 MF_GUILDLOCK 333 332 }; 333 334 334 const char* script_op2name(int op) 335 335 { … … 4324 4324 return 0; 4325 4325 4326 map_foreachinarea(buildin_areawarp_sub, 4327 m,x0,y0,x1,y1,BL_PC, index,x,y ); 4326 map_foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1,BL_PC, index,x,y); 4328 4327 return 0; 4329 4328 } … … 7571 7570 } 7572 7571 7573 map_foreachinmap(buildin_killmonsterall_sub_strip, 7574 m,BL_MOB); 7572 map_foreachinmap(buildin_killmonsterall_sub_strip,m,BL_MOB); 7575 7573 return 0; 7576 7574 } … … 9029 9027 case MF_PARTYLOCK: script_pushint(st,map[m].flag.partylock); break; 9030 9028 case MF_GUILDLOCK: script_pushint(st,map[m].flag.guildlock); break; 9031 case MF_HOSTILE: script_pushint(st,map[m].flag.hostile); break;//Sketchy9032 9029 } 9033 9030 } … … 9094 9091 case MF_PARTYLOCK: map[m].flag.partylock=1; break; 9095 9092 case MF_GUILDLOCK: map[m].flag.guildlock=1; break; 9096 case MF_HOSTILE: map[m].flag.hostile=1; break;//Sketchy9097 9093 } 9098 9094 } … … 9156 9152 case MF_PARTYLOCK: map[m].flag.partylock=0; break; 9157 9153 case MF_GUILDLOCK: map[m].flag.guildlock=0; break; 9158 case MF_HOSTILE: map[m].flag.hostile=0; break;//Sketchy9159 9154 } 9160 9155 } … … 11810 11805 data = script_getdata(st,3); 11811 11806 11807 if( script_hasdata(st,4) ) 11808 class_ = script_getnum(st,4); 11812 11809 if( script_hasdata(st,5) ) 11813 11810 size = script_getnum(st,5); 11814 if( script_hasdata(st,4) )11815 class_ = script_getnum(st,4);11816 11811 11817 11812 get_val(st, data); … … 12150 12145 flag = script_getnum(st,3); 12151 12146 nd = npc_name2id(shopname); 12152 if (!nd || nd->bl.type!=BL_NPC || nd->subtype!=SHOP) { 12147 if( !nd || nd->bl.type != BL_NPC || (nd->subtype != SHOP && nd->subtype != CASHSHOP) ) 12148 { 12153 12149 ShowError("buildin_callshop: Shop [%s] not found (or NPC is not shop type)\n", shopname); 12154 12150 script_pushint(st,0); … … 12156 12152 } 12157 12153 12158 switch (flag) { 12159 case 1: //Buy window 12160 npc_buysellsel(sd,nd->bl.id,0); 12161 break; 12162 case 2: //Sell window 12163 npc_buysellsel(sd,nd->bl.id,1); 12164 break; 12165 default: //Show menu 12166 clif_npcbuysell(sd,nd->bl.id); 12167 break; 12168 } 12154 if( nd->subtype == SHOP ) 12155 { 12156 switch( flag ) 12157 { 12158 case 1: npc_buysellsel(sd,nd->bl.id,0); break; //Buy window 12159 case 2: npc_buysellsel(sd,nd->bl.id,1); break; //Sell window 12160 default: clif_npcbuysell(sd,nd->bl.id); break; //Show menu 12161 } 12162 } 12163 else 12164 clif_cashshop_show(sd, nd); 12165 12169 12166 sd->npc_shopid = nd->bl.id; 12170 12167 script_pushint(st,1); … … 13381 13378 } 13382 13379 13383 /// Changes invoking character to alliance [sketchy]13384 /// usage: alliance;13385 BUILDIN_FUNC(god)13386 {13387 TBL_PC* sd;13388 sd = script_rid2sd(st);13389 if( sd == NULL )13390 return 0;13391 13392 sd->state.demon = 0;13393 sd->state.god = 1;13394 return 0;13395 }13396 13397 /// Changes invoking character to horde [sketchy]13398 /// usage: horde;13399 BUILDIN_FUNC(demon)13400 {13401 TBL_PC* sd;13402 13403 sd = script_rid2sd(st);13404 if( sd == NULL )13405 return 0;13406 13407 sd->state.god = 0;13408 sd->state.demon = 1;13409 return 0;13410 }13411 13412 /// Clears faction [sketchy]13413 /// usage: factionclear;13414 BUILDIN_FUNC(factionclear)13415 {13416 TBL_PC* sd;13417 13418 sd = script_rid2sd(st);13419 if( sd == NULL )13420 return 0;13421 13422 sd->state.god = 0;13423 sd->state.demon = 0;13424 return 0;13425 }13426 13380 13427 13381 // declarations that were supposed to be exported from npc_chat.c … … 13697 13651 BUILDIN_DEF(getstrlen,"s"), //strlen [Valaris] 13698 13652 BUILDIN_DEF(charisalpha,"si"), //isalpha [Valaris] 13699 BUILDIN_DEF(setnpcdisplay,"sv? "),13653 BUILDIN_DEF(setnpcdisplay,"sv??"), 13700 13654 BUILDIN_DEF(compare,"ss"), // Lordalfa - To bring strstr to scripting Engine. 13701 13655 BUILDIN_DEF(getiteminfo,"ii"), //[Lupus] returns Items Buy / sell Price, etc info … … 13774 13728 BUILDIN_DEF(setquestobjective, "iisi"), 13775 13729 BUILDIN_DEF(setqueststatus, "ii"), 13776 BUILDIN_DEF(god,""), // sets invoking character to alliance [Sketchy]13777 BUILDIN_DEF(demon,""), // sets invoking character to horde [Sketchy]13778 BUILDIN_DEF(factionclear,""), // clears invoking character's factions [Sketchy]13779 13730 BUILDIN_DEF(hasquest, "i"), 13780 13731 {NULL,NULL,NULL}, -
src/map/skill.c
r22 r23 42 42 #define GD_SKILLRANGEMIN 900 43 43 #define GD_SKILLRANGEMAX GD_SKILLRANGEMIN+MAX_GUILDSKILL 44 #define HM_SKILLRANGEMIN 1 10044 #define HM_SKILLRANGEMIN 1000 45 45 #define HM_SKILLRANGEMAX HM_SKILLRANGEMIN+MAX_HOMUNSKILL 46 46