Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    71

Posts posted by sader1992

  1. An easy way to do with

    replace
    for( set .@i,1; .@i <= 15; set .@i,.@i+1 ){
    	if( getequipisequiped(.@i) )
    		set .@menu$, .@menu$ + .@position$[.@i] + "[ " + getequipname(.@i) + " ]";
    		set .@menu$, .@menu$ + ":";
    }
    
    WITH
    
    if( getequipisequiped(EQI_SHADOW_ARMOR) ){
    	set .@menu$, .@menu$ + .@position$[EQI_SHADOW_ARMOR] + "[ " + getequipname(EQI_SHADOW_ARMOR) + " ]";
    }
    set .@menu$, .@menu$ + ":";
    if( getequipisequiped(EQI_SHADOW_WEAPON) ){
    	set .@menu$, .@menu$ + .@position$[EQI_SHADOW_WEAPON] + "[ " + getequipname(EQI_SHADOW_WEAPON) + " ]";
    }
    set .@menu$, .@menu$ + ":";

    you can optimize it ofc

  2. On 1/11/2021 at 2:36 AM, tonn said:

    Hey @sader1992,

    In this bit (line 29), I think you mistakenly reused .@i where you could've used something else like .@j. It is, obviously, causing some problems when the categories have an item reward.

    
    			if(getd(".IRD_" + .@i)){
    				for(.@i=0;.@i<getarraysize(getd(".IRD_" + .@i));.@i++){
    					getitem(getd(".IRD_" + .@i + "[" + .@i + "]"),getd(".CRD_" + .@i + "[" + .@i + "]"));
    				}
    			}

    I appreciate you rewriting this script, though. I find it more flexible than the previous version. /ok

    thanks for the report , the problems should be fixed in 5.1

    On 1/24/2021 at 10:25 AM, aferny said:

    Hey @sader1992

     

    Im using this on our server, how ever someone actually exploited it. They got 10k points with in a few min. Do you have any idea how this happened? The guy didnt want to say anything.

    Thank you!

    thanks for the report , the problems should be fixed in 5.2

    <exploit explanation removed from this reply, I encourage updating the script so no one exploit it>

    I would suggest to change the main variable (I moved it to the config in 5.2)[also change the shop variable] , if you changed the variable , the whole system will be reseted , and all the points would be reseted for all the players(or just delete the points from the player who exploited the system)

     

  3. the only other warning is advertising , which is +3 points , the warning you got is a lighter version of advertising 

    even if you didn't mean to , your reply does give a sign to (talk to me in PM if you are willing to pay) I am not saying you meant to do that ?

    for deleting the post , most of the things that against the rule are hidden so it does not set an example for others to do the same

    notice that the user didn't ask for "your script" he asked for a script with the discerption he provided , your reply would be valid and might not be against the rule if the user was asking for "Poring King's script"

  4. 13 hours ago, mharkeke said:

    how can implement this on latest rathena?

    Header:
      Type: ITEM_DB
      Version: 1

    Footer:
      Imports:
      - Path: db/pre-re/item_db.yml
        Mode: Prerenewal
      - Path: db/re/item_db.yml
        Mode: Renewal
      - Path: db/import/item_db.yml

     

    already have this
     

    something like this

      Imports:
      - Path: db/re/item_db.yml
      - Path: db/pre-re/item_db.yml
        Mode: Prerenewal
      - Path: db/re/item_db.yml
        Mode: Renewal
      - Path: db/import/item_db.yml

     

  5. conf/import/char_conf.txt
    login_ip: 127.0.0.1
    char_ip: public_ip
    conf/import/map_conf.txt
    char_ip: 127.0.0.1
    map_ip: public_ip

    and don't forget to check your ports

    • Upvote 1
  6. 2 hours ago, IvanD said:

    Because the one I have when I tested the swordsman job change there’s option that turns into one instantly, I’m using a normal account

    you are using the custom job changer , I am asking about the official quest , all the quest are enabled by default , so just remove the job changer and people would be forced to go do their job quest.

  7. 
    -	script	ANY_MAP_SPAWNER	-1,{
    
    	function	F_SpawnMob	{
    		monster getarg(0),0,0,"--ja--",.mobId,1,"ANY_MAP_SPAWNER::OnMyMobDead";
    		announce "A new mob has spawned!",0;
    		return;
    	}
    
    OnInit:
    	.mobId = 1002;
    	setarray .maps$,"prontera","izlude";
    	for(.@i=0;.@i<getarraysize(.maps$);.@i++){
    		F_SpawnMob(.maps$[.@i]);
    	}
    end;
    
    OnMyMobDead:
    	.@m$ = strcharinfo(3);
    	announce "The mob has been killed by "+strcharinfo(0)+", wait a hour for the respawn.",0;
    	sleep 3600000;
    	F_SpawnMob(.@m$);
    end;
    }

    You need to use for loop

    also after that your timer wont work the way you expect it to, so you replace it with something else

    the script above work the way you want.

  8. 1 hour ago, Get Backers said:

    Thank you so much its ok can you add if there is no monster on the map can not use clear monster.!

    prontera,0,0,0	script	Clear-Monsters	444,{
    	if(!getmapunits(BL_MOB,strnpcinfo(4))){
    		mes "no monsters in this map!";
    		end;
    	}
    	.@zeny = 10000000;
    	mes "do you like to clear all the monsters in this map ?";
    	mes "It will cost you " + F_InsertComma(.@zeny) + "z";
    	if(select("Yes:No") == 2)
    		end;
    	clear;
    	if(Zeny < .@zeny){
    		mes "you don't have " + F_InsertComma(.@zeny) + "z";
    		end;
    	}
    	Zeny -= .@zeny;
    	killmonsterall(strnpcinfo(4));
    	mes "Done!";
    	end;
    }

     

    • Upvote 1
    • Like 1
  9. prontera,0,0,0	script	Clear-Monsters	444,{
    	.@zeny = 10000000;
    	mes "do you like to clear all the monsters in this map ?";
    	mes "It will cost you " + F_InsertComma(.@zeny) + "z";
    	if(select("Yes:No") == 2)
    		end;
    	clear;
    	if(Zeny < .@zeny){
    		mes "you don't have " + F_InsertComma(.@zeny) + "z";
    		end;
    	}
    	Zeny -= .@zeny;
    	killmonsterall(strnpcinfo(4));
    	mes "Done!";
    	end;
    }

     

    • Upvote 1
    • MVP 1
    • Like 1
  10. // Heroes of Vanaheim ====================
    //========================================
    
    -	script	at_veil_cmd	-1,{
    OnVeilWarp:
    	if(agitcheck() || agitcheck2() || agitcheck3()){
    		mes "you can't use this command while the WoE is running!";
    		end;
    	}
    	warp "veil",120,145;
    	end;
    OnInit:
    	bindatcmd "veil", strnpcinfo(0)+"::OnVeilWarp";
    }

     

    • Upvote 1
×
×
  • Create New...