Jump to content

Sryx

Members
  • Posts

    520
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Sryx

  1. Try this post if you encounter error.

    prontera,163,184,4	script	Yoesic	116,{
    	mes "What Song Would you like to play?";
    	switch(select("Streamside:Move your Body:Make a Move:None")) {
    		case 1:
    			if(countitem(.req) < .num) goto noo_noo;
    			playBGMall "12","prontera";
    			announce "Now playing Streamside ~ "+strcharinfo(0)+" ",bc_all,0xFFFF00;
    			delitem .req, .num;
    			close;
    		case 2:
    			if(countitem(.req) < .num) goto noo_noo;
    			playBGMall "13","prontera";
    			delitem .req, .num;
    			close;
    		case 3:
    			if(countitem(.req) < .num) goto noo_noo;
    			playBGMall "14","prontera";
    			delitem .req, .num;
    			close;
    		case 4:
    			mes "Okay Bye Cya Later";
    			close;
    	}
    	noo_noo:
    		mes "No item";
    		close;
    
    	OnInit:
    		set .req, 675; // item requirement
    		set .num, 1; // quantity
    		end;
    }
    
  2. Do it using OnPCLogintEvent, haven't tried this hope it works.

     

    First query it will check if the character have the petrequest.

    Second query will delete data on char_reg_num.

    Next line it will set the #petrequest to 1.

    -		script	transfer	-1,{
    	OnPCLoginEvent:
    		query_sql ("SELECT `char_id` FROM `char_reg_num` WHERE `char_id`= '" + getcharid(0) + "' and `key` = 'petquest'", .@char_id$);
    		if(.@char_id$ != ""){
    			query_sql ("DELETE FROM `char_reg_num` WHERE `char_id`= '" + getcharid(0) + "' and `key` = 'petquest'");
    			set #petquest , 1;
    			end;
    		}
    }
    
  3. Idk if this what you mean.

     

    Change this line.

    if(!#Freebie && ( getd("$" + .@lip$ + "_ASD") == 0 )) {
    

    to  (it will give freebies in every new account)

    if(!#Freebie) {
    

    And remove this lines.

    query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`= '" + getcharid(3) + "'", .@last_ip$);
        
    setd "$" + .@last_ip$ + "_ASD", getd("$" + .@last_ip$ + "_ASD") + 1;
    

    If you wan't to give freebies again in specific account you can use the given script above.

  4.  

    hello Rynbef, thanks for your replay, but i need to know where i need to put it on the npc script??

     

    here is my code (the rAthena default)

    //===== rAthena Script =======================================
    //= Job Master
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.4
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= A fully functional job changer.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.1 Fixed reset on Baby job change.
    //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
    //= 1.3 Kagerou/Oboro added.
    //= 1.4 Rebellion added.
    //============================================================
    
    prontera,153,193,6	script	Job Master	123,{
    function Job_Menu;
    
    	mes "[Job Master]";
    	if (Class > Job_Soul_Linker) {
    		mes "No more jobs are available.";
    		close;
    	}
    	if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
    		mes "Please remove your " +
    			((checkfalcon()) ? "falcon" : "") +
    			((checkcart()) ? "cart" : "") +
    			((checkriding()) ? "Peco" : "") +
    			((ismounting()) ? "mount" : "") +
    			" before proceeding.";
    		close;
    	}
    	if (.SkillPointCheck && SkillPoint) {
    		mes "Please use all your skill points before proceeding.";
    		close;
    	}
    
    	.@eac = eaclass();
    	.@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    	if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
    		if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) {
    			.@blvl = .Rebirth[0] - BaseLevel;
    			.@jlvl = .Rebirth[1] - JobLevel;
    			mes "You need " +
    				((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
    				((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
    			close;
    		}
    		if (Class > Job_Crusader2) {
    			mes "Switch to third class?";
    			next;
    			Job_Menu(roclass(.@eac|EAJL_THIRD));
    			close;
    		}
    		while(1) {
    			mes "Select an option.";
    			next;
    			.@i = select(" ~ ^0055FFRebirth^000000:" + ((.ThirdClass) ? " ~ ^FF0000Third Class^000000" : "") + ": ~ ^777777Cancel^000000");
    			if (.@i == 3)
    				close;
    			mes "[Job Master]";
    			mes "Are you sure?";
    			next;
    			Job_Menu(((.@i == 1) ? Job_Novice_High : roclass(.@eac|EAJL_THIRD)));
    			mes "[Job Master]";
    		}
    	}
    	.@j1 = roclass(.@eac|EAJL_2_1);
    	.@j2 = roclass(.@eac|EAJL_2_2);
    	if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
    		setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    	if (Class == Job_Ninja || Class == Job_Gunslinger)
    		setarray .@exp[0], .@j1, 70;
    	if (.@exp[0] && .SecondExpanded) {
    		if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
    			.@blvl = .Rebirth[0] - BaseLevel;
    			.@jlvl = .@exp[1] - JobLevel;
    			mes "You need " +
    				((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
    				((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
    			close;
    		}
    		mes "Switch to " + jobname(.@exp[0]) + "?";
    		next;
    		Job_Menu(.@exp[0]);
    		close;
    	}
    	if (.@eac&EAJL_2)
    		if ((.@eac&(EAJL_UPPER|EAJL_BABY)) || roclass(.@eac|EAJL_UPPER) == -1) {
    			mes "No more jobs are available.";
    			close;
    		}
    	if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
    		if (JobLevel < .JobReq[0])
    			mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
    		else if (Class == Job_Novice_High && .LastJob && lastJob) {
    			mes "Switch classes now?";
    			next;
    			Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
    		} else {
    			switch(Class) {
    			case Job_Novice:
    				Job_Menu(
    					Job_Swordman,
    					Job_Mage,
    					Job_Archer,
    					Job_Acolyte,
    					Job_Merchant,
    					Job_Thief,
    					Job_Super_Novice,
    					Job_Taekwon,
    					Job_Gunslinger,
    					Job_Ninja,
    					Job_Baby
    				);
    				break;
    			case Job_Novice_High:
    				Job_Menu(
    					Job_Swordman_High,
    					Job_Mage_High,
    					Job_Archer_High,
    					Job_Acolyte_High,
    					Job_Merchant_High,
    					Job_Thief_High
    				);
    				break;
    			case Job_Baby:
    				Job_Menu(
    					Job_Baby_Swordman,
    					Job_Baby_Mage,
    					Job_Baby_Archer,
    					Job_Baby_Acolyte,
    					Job_Baby_Merchant,
    					Job_Baby_Thief,
    					Job_Super_Baby
    				);
    				break;
    			default:
    				mes "An error has occurred.";
    				break;
    			}
    		}
    		close;
    	}
    	if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
    		mes "No more jobs are available.";
    	else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
    		mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    	else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
    		mes "Switch classes now?";
    		next;
    		Job_Menu(lastJob + Job_Novice_High);
    	} else
    		Job_Menu(.@j1, .@j2);
    	close;
    
    function Job_Menu {
    	while(1) {
    		if (getargcount() > 1) {
    			mes "Select a job.";
    			.@menu$ = "";
    			for (.@i = 0; .@i < getargcount(); .@i++)
    				.@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
    			.@menu$ = .@menu$+" ~ ^777777Cancel^000000";
    			next;
    			.@i = getarg(select(.@menu$) - 1, 0);
    			if (!.@i)
    				close;
    			if ((.@i == Job_Super_Novice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
    				mes "[Job Master]";
    				mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
    				close;
    			}
    			mes "[Job Master]";
    			mes "Are you sure?";
    			next;
    		} else
    			.@i = getarg(0);
    		if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
    			mes "[Job Master]";
    			mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
    			if (.@i == Job_Novice_High && .LastJob)
    				lastJob = Class;
    			jobchange .@i;
    			if (.@i == Job_Novice_High)
    				resetlvl(1);
    			else if (.@i == Job_Baby) {
    				resetstatus;
    				resetskill;
    				set SkillPoint,0;
    			}
    			specialeffect2 EF_ANGEL2;
    			specialeffect2 EF_ELECTRIC;
    			if (.Platinum)
    				callsub Get_Platinum;
    			close;
    		}
    		if (getargcount() == 1)
    			return;
    		mes "[Job Master]";
    	}
    	end;
    }
    
    Get_Platinum:
    	skill "NV_FIRSTAID",1,SKILL_PERM;
    	switch (BaseClass) {
    	case Job_Novice:
    		if (Class != Job_Super_Novice)
    			skill "NV_TRICKDEAD",1,SKILL_PERM;
    		break;
    	case Job_Swordman:
    		skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
    		skill "SM_FATALBLOW",1,SKILL_PERM;
    		skill "SM_AUTOBERSERK",1,SKILL_PERM;
    		break;
    	case Job_Mage:
    		skill "MG_ENERGYCOAT",1,SKILL_PERM;
    		break;
    	case Job_Archer:
    		skill "AC_MAKINGARROW",1,SKILL_PERM;
    		skill "AC_CHARGEARROW",1,SKILL_PERM;
    		break;
    	case Job_Acolyte:
    		skill "AL_HOLYLIGHT",1,SKILL_PERM;
    		break;
    	case Job_Merchant:
    		skill "MC_CARTREVOLUTION",1,SKILL_PERM;
    		skill "MC_CHANGECART",1,SKILL_PERM;
    		skill "MC_LOUD",1,SKILL_PERM;
    		break;
    	case Job_Thief:
    		skill "TF_SPRINKLESAND",1,SKILL_PERM;
    		skill "TF_BACKSLIDING",1,SKILL_PERM;
    		skill "TF_PICKSTONE",1,SKILL_PERM;
    		skill "TF_THROWSTONE",1,SKILL_PERM;
    		break;
    	default:
    		break;
    	}
    	switch (BaseJob) {
    	case Job_Knight:
    		skill "KN_CHARGEATK",1,SKILL_PERM;
    		break;
    	case Job_Priest:
    		skill "PR_REDEMPTIO",1,SKILL_PERM;
    		break;
    	case Job_Wizard:
    		skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
    		break;
    	case Job_Blacksmith:
    		skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
    		skill "BS_GREED",1,SKILL_PERM;
    		break;
    	case Job_Hunter:
    		skill "HT_PHANTASMIC",1,SKILL_PERM;
    		break;
    	case Job_Assassin:
    		skill "AS_SONICACCEL",1,SKILL_PERM;
    		skill "AS_VENOMKNIFE",1,SKILL_PERM;
    		break;
    	case Job_Crusader:
    		skill "CR_SHRINK",1,SKILL_PERM;
    		break;
    	case Job_Monk:
    		skill "MO_KITRANSLATION",1,SKILL_PERM;
    		skill "MO_BALKYOUNG",1,SKILL_PERM;
    		break;
    	case Job_Sage:
    		skill "SA_CREATECON",1,SKILL_PERM;
    		skill "SA_ELEMENTWATER",1,SKILL_PERM;
    		skill "SA_ELEMENTGROUND",1,SKILL_PERM;
    		skill "SA_ELEMENTFIRE",1,SKILL_PERM;
    		skill "SA_ELEMENTWIND",1,SKILL_PERM;
    		break;
    	case Job_Rogue:
    		skill "RG_CLOSECONFINE",1,SKILL_PERM;
    		break;
    	case Job_Alchemist:
    		skill "AM_BIOETHICS",1,SKILL_PERM;
    		break;
    	case Job_Bard:
    		skill "BA_PANGVOICE",1,SKILL_PERM;
    		break;
    	case Job_Dancer:
    		skill "DC_WINKCHARM",1,SKILL_PERM;
    		break;
    	default:
    		break;
    	}
    	return;
    
    OnInit:
    	setarray .Rebirth[0],255,99;	// Minimum base level, job level to rebirth OR change to third class
    	setarray .JobReq[0],10,40;	// Minimum job level to turn into 1st class, 2nd class
    	.ThirdClass = 1;			// Enable third classes? (1: yes / 0: no)
    	.SecondExpanded = 1;		// Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    	.SNovice = 99;				// Minimum base level to turn into Super Novice
    	.LastJob = 1;				// Enforce linear class changes? (1: yes / 0: no)
    	.SkillPointCheck = 0;		// Force player to use up all skill points? (1: yes / 0: no)
    	.Platinum = 1;				// Get platinum skills automatically? (1: yes / 0: no)
    	end;
    }
    
    

    Just Insert resetlvl(1); to the Jobchange funcion.

    Rynbef~

     

     

    Here

                mes "[Job Master]";
                mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
                if (.@i == Job_Novice_High && .LastJob)
                    lastJob = Class;
                jobchange .@i;
     Add here>> resetlvl(1); 
    
    • Upvote 1
  5.  

    DELETE FROM `storage` WHERE `nameid` = '4407' and account_id = '2000000';
    

    If you want to delete in more than 1 account or more than 1 item.

    DELETE FROM `storage` WHERE `nameid` in ('4407','4408') and account_id in ('2000000','2000001');
    

    If multiple this?

    DELETE FROM `storage` WHERE `nameid` in ('4407','4408','4407') and account_id in ('2000000','2000001','20000002');

     

    Yes you can also use BETWEEN if you have a series/continuous of account id's. (BETWEEN keyword speak itself)

    DELETE FROM `storage` WHERE `nameid` in ('4407','4408','4407') and account_id BETWEEN '2000000' and '2000005';
    
  6. I wish I take all you want in mmo.h if is not what you want, just say it, i'll do my best to take all the file

     

    DId you login using tijo2035?

     

    Make another account that has account id 2000000 don't use tijo2035 its for the server and sql connection.

  7.  

    1. ID is reserved for the server and sql connection, and for you first account use '2000000'.

    2. Make sure that your clientinfo.xml match your compiled packet db.

    I try many ID but no one work and my clientinfo.xml match my compiled packet_db

     

    Post screenshot of your login table, clientinfo and mmo.h

  8. Try this it will delete the account and all characters under the account id 2000005.

    DELETE FROM `login` where `account_id` = '2000005';
    DELETE FROM `char` where `account_id` = '2000005';

    For the Diff Account.

    DELETE FROM `char` where `char_id` IN ('1500099','1500242');
×
×
  • Create New...