Jump to content

Technoken

Members
  • Posts

    505
  • Joined

  • Days Won

    8

Posts posted by Technoken

  1. My bad, i missed an apostrophe XD

    getmapxy(getd("$mapPRT"+strnpcinfo(2)+"$"), getd("$xPRT["+atoi(strnpcinfo(2))+"]"), getd("$yPRT["+atoi(strnpcinfo(2))+"]"), UNITTYPE_NPC, strnpcinfo(3));


    Anyway we can help you better if you post the script or infos of what you really want to achieve.

    Maybe this could help too

    -	script	Pronterian	-1,{
    	end;
    
    OnInit:
    	donpcevent "::OnSetPCoord";
    	end;
    
    OnSetPCoord:
    	.@id = atoi(strnpcinfo(2));
    	getmapxy(.@map$, .@x, .@y, UNITTYPE_NPC);
    	setd "$@PrtMap"+.@id+"$", .@map$;
    	setd "$@PrtX"+.@id+"", .@x;
    	setd "$@PrtY"+.@id+"", .@y;
    	end;
    }
    prontera,150,150,1	duplicate(Pronterian)	Pronterian#1	844
    prontera,150,152,1	duplicate(Pronterian)	Pronterian#2	844
    prontera,150,154,1	duplicate(Pronterian)	Pronterian#3	844

    then fetch the variables with $@PrtMap1$ $@PrtX1 $@PrtY1 and so on..
    PS: I haven't test the script myself /gawi

    • Love 1
  2. You need to use getd to fetch the reference of the variable. and since strnpcinfo(2) returns a string, you need to convert it to number using atoi command.

    Try

    getmapxy(getd("$mapPRT"+strnpcinfo(2)+"$"), getd($xPRT["+atoi(strnpcinfo(2))+"]), getd($yPRT["+atoi(strnpcinfo(2))+"]), UNITTYPE_NPC, strnpcinfo(3));

     

    • Upvote 1
  3. since you are using a scope variable(.@) for the array, it will end when the script ends. You can try to use a temporary character variable (@) instead to pass the array. Just make sure that the variable name is a unique one.

    Quote

    ".@"     - A scope variable.
               They are unique to the instance and scope. Each instance has its
               own scope that ends when the script ends. Calling a function with
               callsub/callfunc starts a new scope, returning from the function
               ends it. When a scope ends, its variables are converted to values
               ('return .@var;' returns a value, not a reference).

     

    • Upvote 1
  4. Try
    item script:

    {},{ doevent "zxcasdqwe::OnEquip"; },{};

    script:

    -	script	zxcasdqwe	-1,{
    end;
    
    OnEquip:
    	switch(Class) {
    		case Job_Paladin:
    			changelook LOOK_HEAD_BOTTOM, 3000;
    			break;
    		case Job_Lord_Knight:
    			changelook LOOK_HEAD_BOTTOM, 3001;
    			break;
    		case Job_Champion:
    			changelook LOOK_HEAD_BOTTOM, 3002;
    			break;
    		default:
    			break;
    	}
    	end;
    }

     

  5. 2 hours ago, luizragna said:

    I want to attack mob and he gets 0 damage.

    So it would be like every attack will miss considered as 0 damage?

    Using setunitdata, you can try to alter the mob mode to MD_SKILL_IMMUNE so skills won't affect it and set perfect dodge to 100 dodge normal attacks.

  6. 1. { Script },{ OnEquip_Script },{ OnUnequip_Script }
    On the onequip script you can use warp "prontera",99,99;

    2. Last location before you equip the item?
    You can save the current location before you execute warp command.

    {},{ getmapxy(@last_map$,@last_x,@last_y,UNITTYPE_PC); warp "prontera",99,99; }, {}

    Then for the portal

    prontera,150,150,4	script	warp#lastmap	45,2,2,{
    	if( @last_map$ != "")
    		warp @last_map$,@last_x,@last_y;
    	else
    		warp "SavePoint",0,0;
    	end;
    }

     

  7. Quote

    Message: Failed to write data/tmp/ConfigServers.php permission error or  data/tmp not exist in Flux:parseConfigFile()

    The error says it. You need to give  user write permission to your data/tmp folder.

    You can try

    chmod -R 755 /var/www/html/data/tmp

     

    • Upvote 1
  8. Can you provide more info about it?
    What's your trunk git hash?
    Did you modify something in it?
     

    Try to check your status.cpp under int status_change_clear(struct block_list* bl, int type)

    if(type == 0) {
    	switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.

    those statuses should be below that line ^

  9. git stash save
    git pull
    git stash pop

    stash save will save your current modifications. pull will update your trunk to the latest hash and stash pop will merge your modifications to your newly updated trunk.

    4 minutes ago, Diana said:

    it will effect on my item db or mob db?

    It will affect it if there's an update on item db and mob db but stash pop will put back the modifications you made.

    usually conflicts arise when you have modifications that will conflict the update. I usually fix conflicts manually (applying the update without removing the conflicted modification).

×
×
  • Create New...