Jump to content

GiovanT

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by GiovanT

  1. Guys, i make enchanter NPC for costume item and  im only want to enchant just for head, middle, lower and garment costume. But i must unequip my Left acc and equip Right acc to do that, please help me to fix my script...thx

    mes "[Costume Enchanter]";
    		mes "Choose any of the equipment you're wearing that you'd like to enchant.";
    		next;
    		setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
    		set .@menu$,"";
    		for(set .@i,1; .@i<=20; set .@i,.@i+1) {
    			if(getequipisequiped(.@i>=10) && !getequipisequiped(.@i>=15) && !getequipisequiped(.@i==14)) {
    				set .@menu$, .@menu$ + "[" + getequipname(.@i) + "]";
    				set .@equipped,1;
    			}
    			set .@menu$, .@menu$ + ":";
    		}
    		if (.@equipped == 0) {
    			mes "[Costume Enchanter]";
    			mes "Please ^0066FFUnequip^000000 your ^0055FFLeft Accessory^000000 and ^0066FFEquip^000000 your ^0055FFRight Accessory^000000";
    			close;
    		}
    		set .@part, select(.@menu$);
    		next;
    
    		if(!getequipisequiped(.@part)) { //custom check
    			mes "[Costume Enchanter]";
    			mes "Sorry, I can only enchant equipment,";
    			mes "not body parts. Come back when you're wearing something";
    			mes "on that slot.";
    			close;
    		}
    		
    		mes "[Costume Enchanter]";
    		mes "What kind of enchantment do you desire?";
    		switch(select("Atk Rate and Hit:Matk Rate and Fixed Cast:Critical Rate and Critical:Long Atk Rate and ASPD:Max HP Rate and Def:Heal Rate and MDef:Cancel")) {
    			case 1:
    				switch(select("Atk Rate and Hit:Cancel")) {
    					case 1: set .@enchantstoneid,29061; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			case 2:
    				switch(select("Matk Rate and Fixed Cast:Cancel")) {
    					case 1: set .@enchantstoneid,29071; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			case 3:
    				switch(select("Critical Rate and Critical:Cancel")) {
    					case 1: set .@enchantstoneid,29081; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			case 4:
    				switch(select("Long Atk Rate and ASPD:Cancel")) {
    					case 1: set .@enchantstoneid,29091; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			case 5:
    				switch(select("Max HP Rate and Def:Cancel")) {
    					case 1: set .@enchantstoneid,29101; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			case 6:
    				switch(select("Heal Rate and MDef:Cancel")) {
    					case 1: set .@enchantstoneid,29111; break;
    					default: set .@enchantstoneid,0; break;
    				}
    				break;
    			default:
    				set .@enchantstoneid,0;
    				break;
    		}
    		
    		set .@enchantitemid, getequipid(.@part); // save id of the item
    		set .@slots, getitemslots(.@enchantitemid); // slots of the item
    		set .@refinelevel, getequiprefinerycnt(.@part); // refine level of the item
    		setarray .@equip_card[0], getequipcardid(.@part,0),getequipcardid(.@part,1),getequipcardid(.@part,2),getequipcardid(.@part,3); // get current cards
    		next;
    		if (.@enchantstoneid == 0) {
    			mes "[Costume Enchanter]";
    			mes "Stop wasting my time...";
    		}
    		else {
    			// anti-hack
    			if (callfunc("F_IsEquipIDHack", .@part, .@enchantitemid) ||
    				callfunc("F_IsEquipCardHack", .@part, .@equip_card[0], .@equip_card[1], .@equip_card[2], .@equip_card[3])) {
    				mes "[Costume Enchanter]";
    				mes "Hey! What do you think you're doing!";
    				mes "Don't you dare switch your gear while I'm working on them, okay?";
    				close;
    			}
    			
    			if (.@equip_card[3] == 0 && .@slots < 4) {
    				set .@equip_card[3],.@enchantstoneid;
    			}
    			else if (.@equip_card[2] == 0 && .@slots < 3) {
    				set .@equip_card[2],.@enchantstoneid;
    			}
    			else if (.@equip_card[1] == 0 && .@slots < 2) {
    				set .@equip_card[1],.@enchantstoneid;
    			}
    			else if (.@equip_card[0] == 0 && .@slots < 1) {
    				set .@equip_card[0],.@enchantstoneid;
    			}
    			else {
    				mes "[Costume Enchanter]";
    				mes "I don't think I can fit any more enchantments";
    				mes "onto this piece of equipment.";
    				close;
    			}
    			
    			specialeffect2 EF_REPAIRWEAPON;
    			delequip .@part;
    			getitem2 .@enchantitemid,1,1,.@refinelevel,0,.@equip_card[0],.@equip_card[1],.@equip_card[2],.@equip_card[3];
    			mes "[Costume Enchanter]";
    			mes "All done!";
    		}
    	}

     

  2. 12 hours ago, Cyro said:

    You don't need other login table , second server use same login table , so once you players register an account they can play both servers with one account and different characters

    So i need 2 database 1 with login table and the second i need to delete the login table?

  3. Just change this line :

    Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2);
    	Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600);
    	Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
    	Add(1,5045,1,0,0,2252,1,1054,450,943,1200);
    
    	Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
    	Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
    
    	Add(3,531,1,3,0,512,1,713,1);
    	Add(3,532,1,3,0,513,1,713,1);
    	Add(3,533,1,3,0,514,1,713,1);
    	Add(3,534,1,3,0,515,1,713,1);
  4. change ->  if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {
    to ->  if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700 || @sold_nameid[.@i] > 20000 && @sold_nameid[.@i] < 20022) {

  5. if(getlook(LOOK_BODY2)){
        // User already has jRO outfit on. Do something...
        
    }

    Oops sorry, still not work... Where should i put that script?

     

    update ***

    Thank all, i already solved it...

×
×
  • Create New...