Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/23/21 in all areas

  1. //for map //cutin2(<"map">,"<filename>",<position>); function cutin2 { freeloop(true); .@map$ = getarg(0); .@filename$ = getarg(1); .@position = getarg(2); .@s = getmapunits(BL_PC,.@map$,.@SD); for(.@i=0;.@i<.@s;.@i++){ if((.@cid = convertpcinfo(.@SD[.@i],CPC_CHAR))) cutin(.@filename$,.@position,.@cid); } return; } //whole server //cutin3("<filename>",<position>); function cutin3 { freeloop(true); .@filename$ = getarg(0); .@position = getarg(1); .@s = getunits(BL_PC,.@SD); for(.@i=0;.@i<.@s;.@i++){ if((.@cid = convertpcinfo(.@SD[.@i],CPC_CHAR))) cutin(.@filename$,.@position,.@cid); } return; }
    1 point
  2. to save time and replies here is a step-by-step rathena/src/map/script.cpp search for BUILDIN_FUNC(cutin) { TBL_PC* sd; if( !script_rid2sd(sd) ) return SCRIPT_CMD_SUCCESS; clif_cutin(sd,script_getstr(st,2),script_getnum(st,3)); return SCRIPT_CMD_SUCCESS; } replace if( !script_rid2sd(sd) ) with if (!script_charid2sd(4, sd)) search and replace this BUILDIN_DEF(cutin,"si"), with BUILDIN_DEF(cutin,"si?"), DON'T FORGET TO RECOMPILE YOUR SERVER! and this is an example on how i would have done it prontera,0,0,0 script gdfjfhadh 444,{ function cutin2; announce("test 1",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 2",BC_ALL); cutin2("prontera","",255); sleep 3000; announce("test 3",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 4",BC_ALL); cutin2("prontera","",255); end; function cutin2 { freeloop(true); .@map$ = getarg(0); .@filename$ = getarg(1); .@position = getarg(2); .@s = getmapunits(BL_PC,.@map$,.@SD); for(.@i=0;.@i<.@s;.@i++){ cutin(.@filename$,.@position,convertpcinfo(.@SD[.@i],CPC_CHAR)); } return; } }
    1 point
×
×
  • Create New...