Angelmelody 221 Posted October 15, 2013 I want the location of warpportal can be specified and then refer to original warpportal command to create new command warpportal2 , but it was still not working as my Intended I have no idea why It does't work , I m still noob in src please check my code , thank you warpportal2 {"<source map>"},<source x>,<source y>,"<target map>",<target x>,<target y>; BUILDIN(warpportal2) { int spx; int spy; unsigned short smapindex, tmapindex; int tpx; int tpy; struct skill_unit_group* group; struct block_list* bl; bl = map->id2bl(st->oid); if( bl == NULL ) { ShowError("script:warpportal: npc is neededn"); return false; } if( script_hasdata(st, 7) ){ smapindex = mapindex_name2id(script_getstr(st,2)); if( smapindex == 0 ) return true;// map not found spx = script_getnum(st,3); spy = script_getnum(st,4); tmapindex = mapindex_name2id(script_getstr(st, 5)); tpx = script_getnum(st,6); tpy = script_getnum(st,7); } else { spx = script_getnum(st,2); spy = script_getnum(st,3); tmapindex = mapindex_name2id(script_getstr(st, 4)); tpx = script_getnum(st,5); tpy = script_getnum(st,6); } if( tmapindex == 0 ) return true;// map not found group = skill->unitsetting(bl, AL_WARP, 4, spx, spy, 0); if( group == NULL ) return true;// failed if(smapindex != 0) group->map = smapindex; group->val1 = (group->val1<<16)|(short)0; group->val2 = (tpx<<16) | tpy; group->val3 = tmapindex; return true;} BUILDIN_DEF(warpportal2,"viisi?"), Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted October 15, 2013 (edited) Doesn't Work, Removed. Edited October 15, 2013 by Dastgir Pojee Quote Share this post Link to post Share on other sites
I want the location of warpportal can be specified and then refer to original warpportal command
to create new command warpportal2 , but it was still not working as my Intended
I have no idea why It does't work , I m still noob in src
please check my code , thank you
warpportal2 {"<source map>"},<source x>,<source y>,"<target map>",<target x>,<target y>;
Share this post
Link to post
Share on other sites