Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    71

Posts posted by sader1992

  1. prontera,0,0,0	script	mvp_kill_count	444,{
    	copyarray(.@name$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
    	copyarray(.@count,$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
    	.@mx = min(.max_show,getarraysize(.@name$));
    	if(.@mx <= 0){
    		mes "No records found";
    		end;
    	}
    	if(getgmlevel() >= .gm_level){
    		switch(select("Skip:Skip:Reset:Skip")){
    			case 3:
    				deletearray($MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
    				mes "Done";
    				end;
    		}
    	}
    	while(.@max < .@mx){
    		.@max++;
    		.@t1 = max(.@count);
    		if(.@t1 <= 0) break;
    		.@n = inarray(.@count,.@t1);
    		if(.@n == -1) break;
    		mes "(" + .@t1 + ") " + .@name$[.@n];
    		deletearray(.@name$[.@n],1);
    		deletearray(.@count[.@n],1);
    	}
    end;
    
    OnNPCKillEvent:
    	.@id = killedrid;
    	if(inarray(.mvp_id,.@id) != -1){
    		if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){
    			if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
    				.@ndx = getarraysize($MVP_KILL_CID);
    				$MVP_KILL_CID[.@ndx] = getcharid(0);
    				$MVP_KILL_NM$[.@ndx] = strcharinfo(0);
    			}
    			$MVP_KILL_COUNT[.@ndx]++;
    		}
    	}
    end;
    
    	function	AddMvp	{
    		.@s = getarraysize(.mvp_id);
    		.@id = getarg(0);
    		.mvp_id[.@s] = .@id;
    		setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",getarg(1));
    		return;
    	}
    
    OnInit:
    	.gm_level = 99;
    	.max_show = 10;
    	//AddMvp(<Monster ID>,<"Map Name">);
    	//AddMvp(<Monster ID>,<"Map Name">);
    	//AddMvp(<Monster ID>,<"Map Name">);
    end;
    }

     

    • Love 1
  2. My internet was down and I was stuck with my 3g internet which was expensive and slow

    I needed something to waste my free time xD

    this is the result

     

    Muse Dash is a rhythm game (which i play a lot of)

    image.png.e3ea1c1e5144e5f1997d470cf0abef7a.png

    I tried to make something like that in Ragnarok

    ofc now that my internet is back I won't complete it ?

     

    the plan was to create more ways not just up and down , to add bosses etc

    also to complete the rhythm of the game , but well , who care

     

     

    The song is Punai Punai Taisou (プナイプナイたいそう) (if you like the song , you might like the 2 follow up to the sung , they also called punai punai)

     

    here is a clip of gura playing it inside of muse dash

     

     

    • Upvote 2
    • Love 1
  3. On 10/22/2021 at 11:22 AM, Kai TH said:

    Hi Every One Plese HELP

    i use bloody branch to summon mvp. but mvp get so less damage on them. and when i use @monster mvp get normal damage same they in self map.

    so how can i fix this on summon mvp on bloody branch and they get normal damage. Please Help me Thank.

    Maybe the problem is that specific map you are in while testing

    bloody branch does not edit the monsters it spawn.

  4. 6 minutes ago, Lelouch vi Britannia said:

    Hey @sader1992 is it possible to add item category to this?

    for example:

    > Headgears

    • Upper Headgears
    • Middle Headgears
    • Lower Headgears

    > Weapons

    • Daggers
    • Swords
    • Bows
    • Staffs
       

    the short answer is no

    the npc config allow you to sort out the options for the equipment , however the UI is the list of what the player is wearing while talking to the npc , similar to the refine npc , so the player cannot choose an equipment in his inventory , he must equip it, and he will see one option for left hand and one option for right hand , he wont see one option for weapon and one option for shield.

  5. Ragnarök Login Background Generator


    resize , convert and slice the image to fit Ragnarok Login Background


    Drag and drop the image you want onto the exe application.
    Do not double click the application, just drag and drop the image onto the application.
    A 'data' folder will be created next to the image (not the application unless they are in the same folder).
    You can add that folder as it is in your '.grf' file.


    This application requires .Net Framework 4.7.2

     

    I know there is other tools, however it didn't work for me, and I am bored of debugging every time I want to create a login background ?

    Source Codehttps://github.com/sader1992/Sader-Ragnarok-Login-Background

     

    logo.png.0f0e6fd3e7c82ae507a2d713da51e4a6.png

    https://sader1992.com/


     

    • Upvote 3
  6. prontera,0,0,0	script	delay	444,{
    	.@t = #DELAY_ERGHLKJ + 60;//60 seconds
    	if(.@t < gettimetick(2)){
    		mes "Try again after " + (gettimetick(2) - .@t) + " seconds";
    		end;
    	}
    	#DELAY_ERGHLKJ = gettimetick(2);
    	mes "Hello!";
    end;
    }

    #ACCOUNT_VARIABLE

    • Upvote 1
  7. 17 minutes ago, Eross said:

    Hi thanks sir @sader1992! it worked .. But the only thing/problem is ? How can I make the EXP output recieved by partymember less for like 60% only and 100% for the killer ? 

    OnNPCKillEvent:
    	query_sql ("SELECT `exp` FROM `party` WHERE `party_id` = "+ getcharid(1), .@exp);
    	if(killedrid!=$MobTypeLow && killedrid!=$MobTypeMid && killedrid!=$MobTypeHard ) { end; }
    	.mobid = killedrid;
    	.@m$ = strcharinfo(3);//the killer map.
    	.@pid = getcharid(1);//get killer party id
    	.@char_id = getcharid(0);//save char id for check later
    	if(.@pid){//the player is in a party
    		getpartymember(.@pid,1,.@cid);//get party information char id
    		getpartymember(.@pid,2,.@aid);//get party information account id
    		.@size = getarraysize(.@cid);//array size
    		for(.@i=0;.@i<.@size;.@i++){
    			if(.@cid[.@i] == .@char_id) continue;//this is the killer , skip
    			if(isloggedin(.@aid[.@i],.@cid[.@i])){//is the party member online?
    				if(strcharinfo(3,.@cid[.@i]) == .@m$){//check the map
    					//the party member is in the same map.
    					//your code here.
    					if (.@exp) {
    						addrid(2,0,getcharid(1));
    					}					
    				}
    			}
    		}
    	}
    	dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,.mobid)+" Job:"+strmobinfo(7,.mobid)+"";
    	set BaseExp,(BaseExp+strmobinfo(6,.mobid));
    	set JobExp,(JobExp+strmobinfo(7,.mobid));
    	end;

     

    as a start do not use addrid and do not set the exp variable , use getexp command , and you can provide the char id to it so player attaching is not needed

    and this is wrong (.mobid = killedrid;) , just use it as it is or set it to ".@" var like (.@mobid = killedrid;)

    and what you want is just math , .@exp = (original_exp/100)*70;

    • Upvote 1
  8. there is 2 ways i can think of

    1. get party information

    OnNPCKillEvent:
    	.@m$ = strcharinfo(3);//the killer map.
    	.@pid = getcharid(1);//get killer party id
    	.@char_id = getcharid(0);//save char id for check later
    	if(.@pid){//the player is in a party
    		getpartymember(.@pid,1,.@cid);//get party information char id
    		getpartymember(.@pid,2,.@aid);//get party information account id
    		.@size = getarraysize(.@cid);//array size
    		for(.@i=0;.@i<.@size;.@i++){
    			if(.@cid[.@i] == .@char_id) continue;//this is the killer , skip
    			if(isloggedin(.@aid[.@i],.@cid[.@i])){//is the party member online?
    				if(strcharinfo(3,.@cid[.@i]) == .@m$){//check the map
    					//the party member is in the same map.
    					//your code here.
    					
    					
    					
    				}
    			}
    		}
    	}
    end;

     

    2. get players list in the map

    OnNPCKillEvent:
    	.@m$ = strcharinfo(3);//the killer map.
    	.@pid = getcharid(1);//get killer party id
    	.@char_id = getcharid(0);//save char id for check later
    	if(.@pid){//the player is in a party
    		.@size = getmapunits(BL_PC,.@m$,.@name$);//get players in the map
    		for(.@i=0;.@i<.@size;.@i++){
    			if(getcharid(0,.@name$[.@i]) == .@char_id) continue;//this is the killer , skip
    			if(getcharid(1,.@name$[.@i]) == .@pid){//check the party id
    				//the party member is in the same map.
    				//your code here.
    				
    				
    				
    			}
    		}
    	}
    end;

     

  9. On 9/14/2021 at 11:28 PM, OscarScorp said:

    I'm close to making this work, but I need to know if an NPC can detect if your Equipped Weapon is Forged and it has at least 1 Very (from Very Very strong).
    Is this possible?

    as I said before , the data are saved in the card slots , you can read the card slot and check out what the return value

     

    ---------------------------------------
    
    *getequipcardid(<equipment slot>,<card slot>)
    
    Returns value from equipped item slot in the indicated slot (0, 1, 2, or 3).
    
    This function returns CARD ID, CARD0_FORGE, CARD0_CREATE, or CARD0_PET (for card 0, if the item is produced).
    It's useful for when you want to check whether an item contains cards or if it's signed.
    
    ---------------------------------------

     

  10. All In One - Random Options Script


    The goal in this script is to allow you to create any random option enchantment system by just creating a new copy of this script , change the script name and setting

    You should be able to create any random option system exist currently in the game

    DO NOT PM ME FOR ERRORS

    Use the forum post to report for any bugs and errors

     

    the script allow you to

    create a group of items  > you can create as many groups as you want

    each group has it's own options

    allow reroll or not

    put price for first time and price for the reroll after the first time

    the price can be zeny, cashpoints, custom points, items

    put random options for all slots or specific slot of the random options slot

     

    put exclusive random options groups so they cannot coexist in the same item

     

     

    The script config and example AT LINE 290 in the script file >

    OnInit:
    	.exv = true;//DO NOT REMOVE THIS.
    	.KeepItemData = true;//if this is 'false , the player will loss the refine+cards from the item when he use this npc.
    	.CustomPointsVariable$ = "#COSTUMPOINTS";//The variable name of the costum points.
    	.CustomPointsName$ = "Server RO Points";//The name of the costum points, this what the player will see.
    	.HardBalance = true;//if this is true , it would be much harder to get high value in the random option.
    	
    	
    	//AddGroup(<Group ID>,<ItemID>,<ItemID>,<ItemID>,<ItemID>,<ItemID>);
    	/*
    	AddGroup Doc
    		<Group ID> = a number between 1 and MAX_INT64
    		DO NOT REUSE THE GROUP ID IN THE SAME FILE CONFIG!
    		DO NOT REUSE THE SAME ITEM ID IN DIFFERENT GROUP!
    		will create a group id 
    		you can add as many as you want items inside a group.
    	*/
    	
    	//AddGroupOption(<Group ID>,<Allow ReRoll?true:false>,<Allow reuse already gotten option?true:false>,<Zeny Cost>,<CashPoint Cost>,<Custom Points Cost>,<Item1 ID Cost>,<Item1 Amount Cost>,<Item2 ID Cost>,<Item2 Amount Cost>,<....ETC>);
    	/*
    	AddGroupOption Doc
    		<Group ID> = A group id that is already created in AddGroup()!.
    		<Allow ReRoll?true:false> = allow reroll an item with random option or not
    		<Allow reuse already gotten option?true:false> = for exammple if you have str in the options and the player gor it , can he get it again in another slot?
    		
    	*/
    	
    	//AddGroupCost(<Group ID>,<Zeny Cost>,<CashPoint Cost>,<Custom Points Cost>,<Item1 ID Cost>,<Item1 Amount Cost>,<Item2 ID Cost>,<Item2 Amount Cost>,<....ETC>);
    	/*
    	AddGroupCost Doc
    		<Group ID> = A group id that is already created in AddGroup()!.
    		<Zeny Cost> = the zeny cost (can be 0)
    		<CashPoint Cost> = the cashpoints cost (can be 0)
    		<Custom Points Cost> = if you are using costum points in the script , check out .CustomPointsVariable$ and .CustomPointsName$ at the start of the script (can be 0)
    		<Item1 ID Cost> = the item cost
    		<Item1 Amount Cost> = the item amount cost
    		
    		You can use as many item,amount cost at the end of the function.
    	*/
    	
    	//AddGroupReRollCost(<Group ID>,<Zeny Cost>,<CashPoint Cost>,<Custom Points Cost>,<Item1 ID Cost>,<Item1 Amount Cost>,<Item2 ID Cost>,<Item2 Amount Cost>,<....ETC>);
    	/*
    	AddGroupReRollCost Doc
    		<Group ID> = A group id that is already created in AddGroup()!.
    		<Zeny Cost> = the zeny cost (can be 0)
    		<CashPoint Cost> = the cashpoints cost (can be 0)
    		<Custom Points Cost> = if you are using costum points in the script , check out .CustomPointsVariable$ and .CustomPointsName$ at the start of the script (can be 0)
    		<Item1 ID Cost> = the item cost
    		<Item1 Amount Cost> = the item amount cost
    		
    		You can use as many item,amount cost at the end of the function.
    	*/
    	
    	//AddGroupChance(<Group ID>,<1st Option Chance>,<2nd Option Chance>,<3rd Option Chance>,<4th Option Chance>,<5th Option Chance>);
    	/*
    	AddGroupChance Doc
    		<Group ID> = A group id that is already created in AddGroup()!.
    		<1st Option Chance> = the Chance to get one of the random options in the slot 1 (can be 0)
    		<2nd Option Chance> = the Chance to get one of the random options in the slot 2 (can be 0)
    		<3rd Option Chance> = the Chance to get one of the random options in the slot 3 (can be 0)
    		<4th Option Chance> = the Chance to get one of the random options in the slot 4 (can be 0)
    		<5th Option Chance> = the Chance to get one of the random options in the slot 5 (can be 0)
    		
    		Keep inmind that if the player didn't get lucky for example at the slot 2 , all the chances after will be ignored
    		you cannot skip a random option slot that would bug the game client.
    	*/
    	
    	//AddOpt(<Group ID>,<Location>,<Random Option ID>,<Minimum Value>,<Maximum Value>);
    	/*
    	AddOpt Doc
    		<Group ID> = A group id that is already created in AddGroup()!.
    		<Location> = you can spisfiy random option to a location from 1 to 5 , but you can use 0 , if you used 0 it will apply to all locations that doesn't have spisfied random options.
    		<Random Option ID> = random option id , you can use the id or the variable , check out the file /rathena/db/re/item_randomopt_db.yml
    		<Minimum Value> = the minimum value
    		<Maximum Value> = the maximum value
    	*/
    	
    	//AddExclusiveOpt(<Random Option ID>,<Random Option ID>,<Random Option ID>,<Random Option ID>,<Random Option ID>);
    	/*
    	AddExclusiveOpt Doc
    		this will help you to prevent a group of random opions typs in the same item in different slots
    		for example
    			RDMOPT_DAMAGE_PROPERTY_NOTHING_TARGET
    			RDMOPT_DAMAGE_PROPERTY_WATER_TARGET
    			RDMOPT_DAMAGE_PROPERTY_GROUND_TARGET
    			RDMOPT_DAMAGE_PROPERTY_FIRE_TARGET
    			RDMOPT_DAMAGE_PROPERTY_WIND_TARGET
    			RDMOPT_DAMAGE_PROPERTY_POISON_TARGET
    			RDMOPT_DAMAGE_PROPERTY_SAINT_TARGET
    			RDMOPT_DAMAGE_PROPERTY_DARKNESS_TARGET
    			RDMOPT_DAMAGE_PROPERTY_TELEKINESIS_TARGET
    			RDMOPT_DAMAGE_PROPERTY_UNDEAD_TARGET
    		if the player got 1 of them in a slot , he wont get another one to another slot
    	*/
    
    //Example!!!>
    //this is just an example , this script allow you to create any random option system you want.
    
    	//Creating Group id 1 , with Hat items inside.
    	AddGroup(1,2220,2221,2222,2223);
    	//Group id 1 Options
    	AddGroupOption(1,true,false);
    	//Group id 1 Cost
    	AddGroupCost(1,50,0,0,502,1,503,2);
    	//Group id 1 ReRoll Cost
    	AddGroupReRollCost(1,50,0,0,502,5,503,2);
    	//Group id 1 Chances.
    	AddGroupChance(1,100,75,60,40,20);AddGroupChance(1,100,100,100,100,100);
    	//Group id 1 Random Option List. location 0 mean all the slot locations
    	AddOpt(1,0,RDMOPT_VAR_STRAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_INTAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_VITAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_LUKAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_AGIAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_DEXAMOUNT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_MAXHPPERCENT,1,100);
    	AddOpt(1,0,RDMOPT_VAR_MAXSPPERCENT,1,100);
    	//those enchantment you wont get unless in slot 5
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_NOTHING_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_WATER_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_GROUND_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_FIRE_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_WIND_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_POISON_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_SAINT_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_DARKNESS_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_TELEKINESIS_TARGET,1,100);
    	AddOpt(1,5,RDMOPT_DAMAGE_PROPERTY_UNDEAD_TARGET,1,100);
    	
    	//this mean those random options cannot coexist in the same item!.
    	AddExclusiveOpt(RDMOPT_DAMAGE_PROPERTY_NOTHING_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_WATER_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_GROUND_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_FIRE_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_WIND_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_POISON_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_SAINT_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_DARKNESS_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_TELEKINESIS_TARGET,
    			RDMOPT_DAMAGE_PROPERTY_UNDEAD_TARGET);
    	
    
    end;

     

    logo.png.17b58a642746b9c3767aebe3af2cef8e.png

    https://sader1992.com/


    • Submitter
    • Submitted
      09/09/2021
    • Category
    • Video
    • Content Author
      sader1992

     

    • Upvote 5
    • Love 1
    • Like 1
  11. 2 hours ago, OscarScorp said:

    Thanks! The script doesn't throw an error anymore and the process can be completed, except, what I'm looking for is enchant a Forged weapon.
    Tried with regular Dagger and it can enchant up to 4 times. Tried with a "Very Strong" Dagger and no bonus is added.

    The item's data are saved in the card slots , that's why runes + custom data(like names etc) cannot coexist

  12. On 9/7/2021 at 11:22 AM, OscarScorp said:

    Finally got the opportunity to try this script but, I get this issue when attempting to enchant (image attached).

    Any idea on what's the problem?
    Thanks in advance!

    help.png

    try this , I am not sure why you are getting this error , however this will use item2 if there is no options found

     

    sader_s_enchant.txt

  13. 	//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;
    	}

     

    • MVP 1
  14. 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;
    	}
    }

     

    • MVP 1
×
×
  • Create New...