Jump to content

qtdan

Members
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by qtdan

  1. ROBASIC ITEM GENERATOR


    Hello rAthena,

    This tool is an item generator, to make easier to add new custom headgears on our servers.

    Don't hesitate to give me a feedbacks or suggestions!

    If you have question pm me on discord imaqtdan#1741

     

    buy me a coffee : [email protected] PAYPAL

     

     


    • Submitter
    • Submitted
      04/24/2022
    • Category
    • Video
      https://youtu.be/hQUM611UBNY
    • Content Author
      qtdan

     

  2. 15 hours ago, Singe Horizontal said:

    A small awk program to be called from command line that generates a job_basepoints.yml for a desired level.
    For windows users, awk is available in cygwin or git bash.
    Change directory to the one where the file was downloaded and run the command :

    ./job_basepoints_re_gen.awk 200 > job_basepoints.yml

    It should produce a job_basepoints.yml file.


    https://gist.github.com/Singe-Horizontal/4c59ca0ee10cd21fd736101bec9e8cfa

    can we have this for pre renewal calc?

  3. @Rynbef

    L_monthly_reset_statue:
    OnTimer1200000:
    //OnClock0000: // refresh every 1 second for debug, change this to 30 seconds or 1 minute
    	for ([email protected] = 0; [email protected] < 5; [email protected]) {
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADTOP, 0;
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADMIDDLE, 0;
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADBOTTOM, 0;
    	}
    	[email protected]$  = "SELECT `char`.`char_id`, `char`.`guild_id`, `char`.`name`, `char`.`class`, `char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, `char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `pvpladder_epic`.`kills`, `pvpladder_epic`.`deaths` ";
    	[email protected]$ += "FROM `char` RIGHT JOIN `pvpladder_epic` ON `char`.`char_id` = `pvpladder_epic`.`char_id` ";
    	[email protected]$ += "ORDER BY `kills` DESC LIMIT 5";
    	[email protected] = query_sql([email protected]$, [email protected], [email protected]_id, [email protected]$, [email protected], [email protected]$, [email protected], [email protected]_color, [email protected]_color, [email protected], [email protected]_top, [email protected]_mid, [email protected]_bottom, [email protected], [email protected]);
    	for ([email protected] = 0; [email protected] < [email protected]; [email protected]) {
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_CLASS, [email protected][[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_SEX, ([email protected]$[[email protected]] == "F")?SEX_FEMALE:SEX_MALE;
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HAIRSTYLE, [email protected][[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HAIRCOLOR, [email protected]_color[[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_CLOTHCOLOR, [email protected]_color[[email protected]];
    		//setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_BODY2, [email protected][[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADTOP, [email protected]_top[[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADMIDDLE, [email protected]_mid[[email protected]];
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_HEADBOTTOM, [email protected]_bottom[[email protected]];
    		setnpcdisplay "pvp_ladder_statues#"+([email protected] +1), [email protected]$[[email protected]];
    		.statue_name$[[email protected] +1] = [email protected]$[[email protected]];
    		.statue_guild$[[email protected] +1] = getguildname([email protected]_id[[email protected]]);
    		.statue_kills[[email protected] +1] = [email protected][[email protected]];
    		.statue_deaths[[email protected] +1] = [email protected][[email protected]];
    	}
    	for ([email protected] = [email protected]; [email protected] < 5; [email protected])
    		setunitdata .pvp_ladder_statues[[email protected] +1], UNPC_CLASS, HIDDEN_WARP_NPC; // HIDDEN_NPC = 111, HIDDEN_WARP_NPC = 139
    	if (.start)
    		initnpctimer;
    	else
    		stopnpctimer;
    	end;

    here on this line 

    setunitdata .pvp_ladder_statues[[email protected] +1],UNPC_SEX,([email protected]$[[email protected]] == "F")?SEX_FEMALE:SEX_MALE;

    we are talking about is when the statue are appearing at the map instead pulling out the gender of the character, whenever its a male or female it only shows female.

  4. On 11/20/2021 at 3:42 AM, AinsLord said:

    it automatically sets cash/zeny for vending

    for using only zeny and cash

    put 0 to the item IDs in item_vending.txt <--- this file is not existing you just need to create it on db/item_vending.txt

    +// Specific items for Vending System
    +// Format: ItemID
    +// Max items is equal MAX_INVENTORY ( 100 by default )
    +
    +// TCG Card
    +7227
    +// Mithril Coin
    +674
    +// Silver Coin
    +675
    +// Bronze Coin
    +673

    but for custom currency or points

    it will make some additional scripts/modification on src

     

    how to set up the item_vending.yaml

    i can see the item currency but i cant buy it,

  5. Just now, Slammer said:

    can u give a full script?

    L_monthly_reset_statue:
    OnTimer1200000:
    //OnClock0000: // refresh every 1 second for debug, change this to 30 seconds or 1 minute
    	for ([email protected]i = 0; [email protected]i < 5; [email protected]i) {
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADTOP, 0;
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADMIDDLE, 0;
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADBOTTOM, 0;
    	}
    	[email protected]query$  = "SELECT `char`.`char_id`, `char`.`guild_id`, `char`.`name`, `char`.`class`, `char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, `char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `pvpladder_epic`.`kills`, `pvpladder_epic`.`deaths` ";
    	[email protected]query$ += "FROM `char` RIGHT JOIN `pvpladder_epic` ON `char`.`char_id` = `pvpladder_epic`.`char_id` ";
    	[email protected]query$ += "ORDER BY `kills` DESC LIMIT 5";
    	[email protected]nb = query_sql([email protected]query$, [email protected]cid, [email protected]guild_id, [email protected]name$, [email protected]class, [email protected]sex$, [email protected]hair, [email protected]hair_color, [email protected]clothes_color, [email protected]body, [email protected]head_top, [email protected]head_mid, [email protected]head_bottom, [email protected]kills, [email protected]deaths);
    	for ([email protected]i = 0; [email protected]i < [email protected]nb; [email protected]i) {
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_CLASS, [email protected]class[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_SEX, ([email protected]sex$[[email protected]i] == "F")?SEX_FEMALE:SEX_MALE;
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HAIRSTYLE, [email protected]hair[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HAIRCOLOR, [email protected]hair_color[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_CLOTHCOLOR, [email protected]clothes_color[[email protected]i];
    		//setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_BODY2, [email protected]body[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADTOP, [email protected]head_top[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADMIDDLE, [email protected]head_mid[[email protected]i];
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_HEADBOTTOM, [email protected]head_bottom[[email protected]i];
    		setnpcdisplay "pvp_ladder_statues#"+([email protected]i +1), [email protected]name$[[email protected]i];
    		.statue_name$[[email protected]i +1] = [email protected]name$[[email protected]i];
    		.statue_guild$[[email protected]i +1] = getguildname([email protected]guild_id[[email protected]i]);
    		.statue_kills[[email protected]i +1] = [email protected]kills[[email protected]i];
    		.statue_deaths[[email protected]i +1] = [email protected]deaths[[email protected]i];
    	}
    	for ([email protected]i = [email protected]nb; [email protected]i < 5; [email protected]i)
    		setunitdata .pvp_ladder_statues[[email protected]i +1], UNPC_CLASS, HIDDEN_WARP_NPC; // HIDDEN_NPC = 111, HIDDEN_WARP_NPC = 139
    	if (.start)
    		initnpctimer;
    	else
    		stopnpctimer;
    	end;
    OnGMCommandStart:
    OnMinute00: // configure time
    //OnMon2000:
    	.start = true;
    	pvpon .map$;
    	deletearray .guild_ownage;
    	initnpctimer;
    	end;
    OnMinute59:
    //OnMon2045:
    	.start = true;
    	pvpon .map$;
    	deletearray .guild_ownage;
    	end;
    L_read:
    	mes "["+ strnpcinfo(1) +"]";
    	mes "Hello! "+strcharinfo(0)+".";
    	mes "Join PVP! To Earn Rewards.";
    	mes "Top 15 of the PVP Rankings will sure get an surprise reward.";
    	next;
    	switch(select(
    		"Enter PvP Room",
    		"Show Top 15 Rank",
    		"My Ranking")) {
    	mes "["+ strnpcinfo(1) +"]";
    	case 1:
    		if (!.start) {
    		if( BaseLevel < 999 || Class == Job_Novice ){
        		mes "Novice or Below level 999 cant enter.";
       		close;
    		}
    			warp .map$, 0, 0; break;
    			close;
    		}
    		if( BaseLevel < 999 || Class == Job_Novice ){
        		mes "Novice or Below level 999 cant enter.";
       		close;
    		}
    		switch(rand(2)) {
    		announce strcharinfo(0) +" entered PVP Room",bc_all,0xe57c00;
    		default: warp .map$, 0, 0; break;
    		case 1: warp .map$, 0, 0; break;
    		}
    		if (@dota_sql_kills == 0 && @dota_sql_deaths == 0)
    			query_sql "SELECT `kills`, `deaths` FROM `pvpladder_epic` WHERE `char_id` = "+ getcharid(0), @dota_sql_kills, @dota_sql_deaths;
    		end;
    	case 2:
    		[email protected]nb = query_sql("SELECT `name`, `kills`, `deaths` FROM `pvpladder_epic` ORDER BY `kills` DESC LIMIT "+ .show_ranking, [email protected]name$, [email protected]kills, [email protected]deaths);
    		if ([email protected]nb) {
    			mes "The ladder currently is empty.";
    			close;
    		}
    		mes "^996600RANK: ^006699NAME ^00AA00[Kills] ^FF0000<Deaths>^000000";
    		for ([email protected]i = 0; [email protected]i < [email protected]nb; [email protected]i) 
    			mes "^996600"+ ([email protected]i+1) +": ^006699"+ [email protected]name$[[email protected]i] +" ^00AA00["+ [email protected]kills[[email protected]i] +"] ^FF0000<"+ [email protected]deaths[[email protected]i] +">^000000";
    		close;
    	case 3:
    		if (!query_sql("SELECT `kills`, `deaths`, 1+(SELECT COUNT(1) FROM `pvpladder_epic` t1 WHERE t1.`kills` > t2.`kills`) FROM `pvpladder_epic` t2 WHERE `char_id` = "+ getcharid(0), [email protected]kills, [email protected]deaths, [email protected]rank)) {
    			mes "You haven't kill anybody in this month.";
    			close;
    		}
    		mes "Your kills -> "+ [email protected]kills;
    		mes "Your deaths -> "+ [email protected]deaths;
    		mes "Your current rank -> "+ F_GetNumSuffix([email protected]rank);
    		close;
    	}
    	end;
    OnPCKillEvent:
    	if (.gmnokill && getgmlevel() >= .gmnokill) end;
    	if (strcharinfo(3) != .map$) end;
    	[email protected]killername$ = strcharinfo(0);
    	[email protected]killeraid = getcharid(3);
    	[email protected]killercid = getcharid(0);
    	[email protected]killerguildid = getcharid(2);
    	attachrid killedrid;
    	[email protected]victimname$ = strcharinfo(0);
    	[email protected]victimaid = getcharid(3);
    	[email protected]victimcid = getcharid(0);
    	[email protected]victimguildid = getcharid(2);
    	if (@PlayersKilledStreak >= .holyshit)
    		[email protected]streakname$ = "Beyond Godlike";
    	else if (@PlayersKilledStreak >= .godlike)
    		[email protected]streakname$ = "Godlike";
    	else if (@PlayersKilledStreak >= .monsterkill)
    		[email protected]streakname$ = "Monster Kill";
    	else if (@PlayersKilledStreak >= .wickedsick)
    		[email protected]streakname$ = "Wicked Sick";
    	else if (@PlayersKilledStreak >= .unstoppable)
    		[email protected]streakname$ = "Unstoppable";
    	else if (@PlayersKilledStreak >= .megakill)
    		[email protected]streakname$ = "Mega-kill";
    	else if (@PlayersKilledStreak >= .dominating)
    		[email protected]streakname$ = "Dominating";
    	else if (@PlayersKilledStreak >= .killingspree)
    		[email protected]streakname$ = "Killing Spree";
    	if (@PlayersKilledStreak >= .killingspree && [email protected]killeraid == [email protected]victimaid)
    		announce sprintf("%s has ended %s own %s[%d] streak", [email protected]killername$, (Sex)?"him":"her", [email protected]streakname$, @PlayersKilledStreak), bc_all,0xe57c00;
    	else if (@PlayersKilledStreak >= .killingspree)
    		announce sprintf("%s has ended %s's %s[%d] streak", [email protected]killername$, [email protected]victimname$, [email protected]streakname$, @PlayersKilledStreak), bc_all,0xe57c00;
    	else if ([email protected]killeraid != [email protected]victimaid)
    		announce sprintf("%s has pawned %s's head", [email protected]killername$, [email protected]victimname$), bc_all,0xe57c00;
    	@PlayersKilledStreak = 0;
    	[email protected]dota_sql_deaths;
    	@dota_multikills = 0;
    	if ([email protected]victimguildid)
    		.guild_ownage[[email protected]victimguildid] = 0;
    	if ([email protected]killeraid == [email protected]victimaid) {
    		query_sql "REPLACE INTO `pvpladder_epic` VALUES ("+ [email protected]victimcid +", '"+ escape_sql([email protected]victimname$) +"', "+ @dota_sql_kills +", "+ @dota_sql_deaths +")";
    		end;
    	}
    	[email protected]victim_kills = @dota_sql_kills;
    	[email protected]victim_deaths = @dota_sql_deaths;
    	attachrid killerrid;
    	[email protected]PlayersKilledStreak;
    	[email protected]dota_sql_kills;
    	if (@PlayersKilledStreak == .killingspree)
    		setarray [email protected]streakname$, "killingspree.wav", "is on a KILLING SPREE", "!";
    	else if (@PlayersKilledStreak == .dominating)
    		setarray [email protected]streakname$, "dominating.wav", "is DOMINATING", "!";
    	else if (@PlayersKilledStreak == .megakill)
    		setarray [email protected]streakname$, "megakill.wav", "has a MEGA KILL", "!";
    	else if (@PlayersKilledStreak == .unstoppable)
    		setarray [email protected]streakname$, "unstoppable.wav", "is UNSTOPPABLE", "!!";
    	else if (@PlayersKilledStreak == .wickedsick)
    		setarray [email protected]streakname$, "wickedsick.wav", "is WICKED SICK", "!!";
    	else if (@PlayersKilledStreak == .monsterkill)
    		setarray [email protected]streakname$, "monsterkill.wav", "has a MONSTER KILL", "!!";
    	else if (@PlayersKilledStreak == .godlike)
    		setarray [email protected]streakname$, "godlike.wav", "is GODLIKE", "!!!";
    	else if (@PlayersKilledStreak >= .holyshit && ((@PlayersKilledStreak - .holyshit) % .continue == 0))
    		setarray [email protected]streakname$,"holyshit.wav", "is BEYOND GODLIKE",". Someone KILL "+( (Sex)?"HIM":"HER" ) +"!!!!!!";
    	if (getstrlen([email protected]streakname$[1])) {
    		announce sprintf("%s %s[%d] %s", [email protected]killername$, [email protected]streakname$[1], @PlayersKilledStreak, [email protected]streakname$[2]), bc_all,0xe57c00;
    		soundeffectall [email protected]streakname$[0], 0, .map$;
    	}
    	[email protected]dota_multikills;
    	deltimer strnpcinfo(0) +"::OnStreakReset";
    	addtimer 18000, strnpcinfo(0) +"::OnStreakReset";
    	query_sql sprintf("REPLACE INTO `pvpladder_epic` VALUES (%d, '%s', %d, %d), (%d, '%s', %d, %d)",
    		[email protected]killercid, escape_sql([email protected]killername$), @dota_sql_kills, @dota_sql_deaths,
    		[email protected]victimcid, escape_sql([email protected]victimname$), [email protected]victim_kills, [email protected]victim_deaths);
    	if ([email protected]killerguildid && [email protected]killerguildid != [email protected]victimguildid)
    		++.guild_ownage[[email protected]killerguildid];
    	[email protected]dota_multikills = @dota_multikills;
    	sleep 1500;
    	if ([email protected]killerguildid && [email protected]killerguildid != [email protected]victimguildid && .guild_ownage[[email protected]killerguildid] >= .owned && ((.guild_ownage[[email protected]killerguildid] - .owned) % .owncontinue == 0)) {
    		announce "The guild ["+ getguildname([email protected]killerguildid) +"] is OWNING["+ .guild_ownage[[email protected]killerguildid] +"] !!!", bc_all;
    		soundeffectall "ownage.wav",0,[email protected]map$;
    	}
    	sleep 1250;
    	if (!attachrid([email protected]killeraid)) end;
    	if ([email protected]dota_multikills == 2) {
    		announce strcharinfo(0) +" just got a Double Kill !", bc_all,0xe57c00;
    		soundeffectall "doublekill.wav", 0, .map$;
    	}
    	else if ([email protected]dota_multikills == 3) {
    		announce strcharinfo(0) +" just got a Triple Kill !!!", bc_all,0xe57c00;
    		soundeffectall "triplekill.wav", 0, .map$;
    	}
    	else if ([email protected]dota_multikills == 4) {
    		announce strcharinfo(0) +" just got an Ultra Kill !!!", bc_all,0xe57c00;
    		soundeffectall "ultrakill.wav", 0, .map$;
    	}
    	else if ([email protected]dota_multikills >= 5) {
    		announce strcharinfo(0) +" is on a Rampage !!!", bc_all,0xe57c00;
    		soundeffectall "rampage.wav", 0, .map$;
    	}
    	end;
    OnStreakReset:
    	@dota_multikills = 0;
    	end;
    OnClock0000:
    	if (gettime(DT_DAYOFMONTH) != 1) end;
    L_Monthly_Reward_Rank:
    	$pvpevent_last_given = atoi(gettime(7) +""+ gettime(6));
    	[email protected]nb = query_sql("SELECT `char_id` FROM `pvpladder_epic` ORDER BY `kills` DESC LIMIT "+ .reward_monthly, [email protected]cid);
    	if ([email protected]nb) end;
    	for ([email protected]i = 0; [email protected]i < [email protected]nb; [email protected]i) {
    		setarray [email protected]mail_itemid, getd(".reward_monthly_for_rank_"+([email protected]i +1)+"[1]"), getd(".reward_monthly_for_rank_"+([email protected]i +1)+"[3]");
    		setarray [email protected]mail_amount, getd(".reward_monthly_for_rank_"+([email protected]i +1)+"[0]"), getd(".reward_monthly_for_rank_"+([email protected]i +1)+"[2]");
    		mail [email protected]cid[[email protected]i],
    			"PvP Ladder Event",
    			"Monthly PvP Ladder Event Rewards",
    			"Congratulations for being "+ F_GetNumSuffix([email protected]i +1) +" Rank on PvP Ladder Event, this is your rewards.",
    			0,
    			[email protected]mail_itemid,
    			[email protected]mail_amount;
    	}
    	query_sql "TRUNCATE `pvpladder_epic`";
    	goto L_monthly_reset_statue;
    }
    function	script	pvp_ladder_statues	{
    	[email protected]id = inarray(getvariableofnpc(.pvp_ladder_statues, "PvP Ladder Event"), getnpcid(0));
    	mes "^996600[TOP "+ [email protected]id +"]";
    	mes "^006699Name : "+ getelementofarray(getvariableofnpc(.statue_name$, "PvP Ladder Event"), [email protected]id);
    	[email protected]guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "PvP Ladder Event"), [email protected]id);
    	mes "^00AAAAGuild : "+(([email protected]guildname$ == "null")? "^666666None": [email protected]guildname$);
    	mes " ";
    	mes "^00AA00Kills : ["+ getelementofarray(getvariableofnpc(.statue_kills, "PvP Ladder Event"), [email protected]id) +"]";
    	mes "^FF0000Deaths : <"+ getelementofarray(getvariableofnpc(.statue_deaths, "PvP Ladder Event"), [email protected]id) +">";
    	return;
    }
    maintown,253,247,4	script	pvp_ladder_statues#1	HIDDEN_WARP_NPC,{ callfunc "pvp_ladder_statues"; end; OnInit: set getvariableofnpc(.pvp_ladder_statues[1], "PvP Ladder Event"), getnpcid(0); end; }
    maintown,256,247,4	script	pvp_ladder_statues#2	HIDDEN_WARP_NPC,{ callfunc "pvp_ladder_statues"; end; OnInit: set getvariableofnpc(.pvp_ladder_statues[2], "PvP Ladder Event"), getnpcid(0); end; }
    maintown,259,247,4	script	pvp_ladder_statues#3	HIDDEN_WARP_NPC,{ callfunc "pvp_ladder_statues"; end; OnInit: set getvariableofnpc(.pvp_ladder_statues[3], "PvP Ladder Event"), getnpcid(0); end; }
    maintown,262,247,4	script	pvp_ladder_statues#4	HIDDEN_WARP_NPC,{ callfunc "pvp_ladder_statues"; end; OnInit: set getvariableofnpc(.pvp_ladder_statues[4], "PvP Ladder Event"), getnpcid(0); end; }
    maintown,265,247,4	script	pvp_ladder_statues#5	HIDDEN_WARP_NPC,{ callfunc "pvp_ladder_statues"; end; OnInit: set getvariableofnpc(.pvp_ladder_statues[5], "PvP Ladder Event"), getnpcid(0); end; }

    HERE

×
×
  • Create New...

Important Information

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