Jump to content
  • 0
Angelmelody

script command modification need help

Question

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?"),

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Doesn't Work, Removed.

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.