Jump to content
  • 0

[Request] Xriazome Ena sql command


Question

Posted

Paideia xriazome ena sql command pou na mpwrei na kanei olla ta monsters sto game na kanoun drop kapoia sigkekrimena farm items pou 8elw egw :) mpwrei kapoios na boi8isi? einai epigon...

Recommended Posts

  • 0
Posted

κάντο μέσω java καλύτερα, μην επιβαρύνεις πολύ τη βάση δεδομένων.

  • 0
Posted

δοκίμασε αυτό

 

UPDATE droplist SET mobId = 22215, itemId = 6619, min = 1, max = 1, category = 1, chance = 7000

 

δν ξέρω τι client χρησιμοποιείς ίσως τα ονόματα των column να μην είναι ακριβώς ίδια προσάρμοσε τα εσύ ανάλογα !

  • 0
Posted

η μια λύση είναι να το κάνεις έτσι,

DELETE FROM droplist WHERE itemId NOT IN (x,y);

 

δηλαδή να κάνεις delete όλα τα items που πετάνε τα mobs εκτός απο ADENA π.χ

 


 

και ο άλλος,ο τρόπος που ζήτησες.

insert into droplist (mobId, itemid, chance, min, max,category) select id, 4037, 1000000, 1, 1, 52 from npc where type='L2Monster';

 

αυτά

  • 0
Posted

Oxi 8elw na minoun ola ta drops apla den ginete na balw se ola ta monsters mesa sto game to sigekrimenw item pou 8elw na petaei? afto to sql command zitaw diladi oti kai na skwtoso na rixnei afto to item eno ta droplist na minoun etc opos htan

  • 0
Posted

ε ναι,με το δεύτερο sql στην ουσία αυτό κάνεις,διαλέγεις ένα δικό σου mob και βάζεις id/chance/amount etc.

 

αυτό δεν θες;

  • 0
Posted

το δεύτερο που σου έδωσε ο φάνκυ κάνει αυτό που θες !

 

από εδώ το πήρε θα βρεις και άλλα χρήσιμα ;)

 

http://maxcheaters.com/forum/index.php?topic=98212.0

  • 0
Posted

το δεύτερο που σου έδωσε ο φάνκυ κάνει αυτό που θες !

 

από εδώ το πήρε θα βρεις και άλλα χρήσιμα ;)

 

http://maxcheaters.com/forum/index.php?topic=98212.0

αυτό που έδωσα εγώ είναι για 1 συγκεκριμένο mob,εκείνος το θέλει για όλα.
  • 0
Posted

αυτό που έδωσα εγώ είναι για 1 συγκεκριμένο mob,εκείνος το θέλει για όλα.

κάτι έχεις καταλάβει λάθος

 

from npc where type='L2Monster';

  • 0
Posted

κάτι έχεις καταλάβει λάθος

 

from npc where type='L2Monster';

όπα,έχεις δίκιο.

μπερδεύτηκα απο το πρώτο μέρος.

 

ρομεο,έχει δίκιο ο nevermore.

  • 0
Posted

κάντο μέσω java καλύτερα, μην επιβαρύνεις πολύ τη βάση δεδομένων.

to sigekrimeno ine xirotera me java giati tha checkarei gia kathe mob pou troei o pektis to sigekrimeno drop. episis den epivarinete katholou ma katholou i vasi dedomenon giati apla einai mono 1 connection :D

 

 

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.admincommandhandlers;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.StringTokenizer;

import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
* @author irat
*
*/
public class AdminAllDrop implements IAdminCommandHandler
{

private String[] command = {"admin_all_drop"};

private boolean canContinue(int a, int b, int g, int d , int e, int z){
	if(a == 0 || b == 0 || g == 0 || d == 0 || e == 0 || z ==0)
		return false;
	return true;	
}

public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
	if(activeChar == null)
		return false;

	if(command.startsWith("admin_all_drop"))
	{
		//type : mobId itemId chance min max category

		int mobId , itemId , chance , min , max , category;

		StringTokenizer st = new StringTokenizer(command);

	if(!st.hasMoreTokens()){
		activeChar.sendMessage("nothing happened");
		return false;
	}
		mobId = Integer.parseInt(st.nextToken());
		itemId = Integer.parseInt(st.nextToken());
		chance = Integer.parseInt(st.nextToken());
		min = Integer.parseInt(st.nextToken());
		max = Integer.parseInt(st.nextToken());
		category = Integer.parseInt(st.nextToken());

		if(canContinue(mobId,itemId,chance,min,max,category))
		{
			Connection con = null;
			PreparedStatement state = null;
			try
			{
				con = L2DatabaseFactory.getInstance().getConnection();
				state = con.prepareStatement("UPDATE droplist SET mobId = ?, itemId = ?, min = ?, max = ?, category = ?, chance = ? ");
				state.setInt(1, mobId);
				state.setInt(2, itemId);
				state.setInt(3, chance);
				state.setInt(4, min);
				state.setInt(5, max);
				state.setInt(6, category);
				state.execute();

				state.close();

				for(L2Object monster : L2World.getInstance().getAllVisibleObjects()){
					  if(monster != null && monster instanceof L2MonsterInstance){
						  monster.decayMe();
						  monster.spawnMe();
					  }
				}
			}
			catch(Exception ie){
				ie.printStackTrace();
			}
			finally{
				try
				{
					con.close();
				}
				catch (SQLException e)
				{

				}
			}
		}
		else{
			activeChar.sendMessage("something not loaded");
			return false;
		}

	}

	return true;
}


public String[] getAdminCommandList()
{
	return command;
}

}

 

//all_drop mobId itemId chance min max category

 

  • 0
Posted

-- ############## START ##############

-- INSERT DATA
INSERT INTO droplist 
(
mobId,
itemId,
min,
max,
category,
chance)

-- SELECT ALL entries FROM npc TABLE AND INSERT INTO another TABLE
SELECT
id , '41000', '1', '1', '15', '1000000' FROM npc WHERE type = "L2Monster";


-- ############## END ##############

kane afto kai ksemperdepses, ekei pou leei to 41000 einai to id apo to item oi asoi einai to min kai to max kai to 1000000 einai to chance, vale ta dika sou kai eisai etoimos, oute java oute tpt

P.S tested and worked.

  • 0
Posted

Diladi dn yparxei tropos na ginei me sql? giati kapote eixa to command ala ekana to pc m format apo 7 se xp k exasa polla arxeia p htan xrisima gia mena :P gia na ksemperdeuoume kai na min sas prizw allo twra diladi afto to deutero sql p estile o fanky editari automata ola ta droplist sto paixnidi? giati afto akribos 8elw oxi ena sigekrimenw mob apla egw na grapsw mono to id kai to chance apo to item kai molis to perasw stn db kai loggaro ksana mesa ola ta mobs p skotonw na rixnoun afta ta item :)

  • 0
Posted

yparxei.........

-- ############## START ##############

-- INSERT DATA
INSERT INTO droplist 
(
mobId,
itemId,
min,
max,
category,
chance)

-- SELECT ALL entries FROM npc TABLE AND INSERT INTO another TABLE
SELECT
id , '41000', '1', '1', '15', '1000000' FROM npc WHERE type = "L2Monster";


-- ############## END ##############

Guest
This topic is now closed to further replies.


  • Posts

    • L2 Kings    Stage 1 – The Awakening Dynasty and Moirai Level Cap: 83 Gear: Dynasty -Moirai & Weapons (Shop for Adena + Drop from mobs/instances ) Masterwork System: Available (Neolithics S required with neolithics u can do armor parts foundation aswell) Class Cloaks: Level 1 - Masterwork sets such us moirai/dynasty stats are boosted also vesper(stage 2) Olf T-Shirt: +6 (fails don’t reset) safe is +2 Dolls: Level 1 Belts: Low & Medium Enchant: Safe +3 / Max +8 / Attribution Easy in Moirai-Dynasty . Main Zones: Varka Outpost: Easy farm, Adena, EXP for new players = > 80- 100kk hour Dragon Valley: Main farm zone — , 100–120kk/hour Weapon Weakness System active (all classes can farm efficiently) Archers get vampiric auto-hits vs mobs Dragon Valley Center: Main Party Zone — boosted drops (Blessed enchants, Neolithics chance) => farm like 150-200kk per hour. Dragon Valley North: Spoil Zone (Asofe + crafting materials for MW) Primeval Isle: Safe autofarm zone (low adena for casual players) ==> 50kk per hour Forge of the Gods & Imperial Tomb: Available from Stage 1 (lower Adena reward in compare with Dragon Valley) Hellbound also avaliable from stage 1 In few words all zones opened but MAIN farm zone with boosted adena and drops is Dragon valley also has more mobs Instances: Zaken (24h Reuse) → Instead of Vespers drop Moirai , 100% chance to drop 1 of 9 dolls lvl 1, Zaken 7-Day Jewelry Raid Bosses (7 RBs): Drop Moirai Parts + Neolithic S grade instead of Vespers parts that has 7 Rb Quest give Icarus Weapons Special Feature 7rb bosses level up soul crystals aswell. Closed Areas : Monaster of SIlence, LOA, ( It wont have mobs) / Mahum Quest/Lizardmen off) Grand Epics: Unlocked on Day 4 of Stage 1 → Antharas, Valakas, Baium, AQ, etc ================================================================================= Stage 2 – Rise of Vespers Level Cap: 85 Gear: Moirai Armors (Adena GM SHOP / Craft/ Drop) Weapons: Icarus Cloaks: Level 2 Olf: +8 Dolls: Level 2 Belts: High & Top Enchant: Safe +3 / Max +8 Masterwork can be with Neolithics S84 aswell but higher so craft will be usefull aswell. 7 Raid Boss Quest Updated: Now works retail give vesper weapons 7rb Bosses Drops : Vespers Instances: Zaken : Drops to retail vespers + the dolls and the extra items that we added on stage 1 New Freya Instance: Added — drops vespers and instead of mid s84 weapons will drop vespers . Extra drops Blessed Bottle of Freya - drops 100% chance 1 of 9 dolls. Farm Areas Dragon Valley remains main farm New Zone : Lair of Antharas (mobs nerfed and added drop Noble stone so solo players can farm too) New Party Zone : LOA Circle   ============================================================================   Stage 3 – The Vorpal ERA Gear: Vorpal Unclock Cloaks: Level 3 Olf: +10 (max cap) Dolls: Level 3 Enchant: Safe +3 / Max +12 Farm Zones : Dragon Valley Center Scorpions becomes a normal solo zone (no longer party zone) Drops:   LOA & Knorik → Mid Weapons avaliable in drop New Party Zone Kariks Instances: Easy Freya Drops Mid Weapons Frintezza Release =================================================================================     Stage 4 – Elegia Era (Final Stage) Elegia Unlock Gear: Elegia Weapons: Elegia TOP s84 ( farmed via H-Freya/ Drops ) Cloaks: Level 5 Dolls: Level 3 (final bonuses) Enchant: Safe +6 / Max +16 Instances: Hard Freya → Drops Elegia Weapons + => The Instance will drop 2-3 parts for sure and also will be able to Join with 7 people . Party Zone will have also drop chances for elegia armor parts and weapons but small   Events (Hourly): Win: 50 Event Medals + 3 GCM + morewards Lose: 25 Medals + 1 GCM + more rewards Tie: 30 Medals + 2 GCM + more rewards   ================================================================================ Epic Fragments Currency Participating in Daily Bosses mass rewarding all players Participating in Instances (zaken freya frintezza etc) all players get reward ================================================================================ Adena - Main server currency (all items in gm shop require adena ) Event Medals (Festival Adena) - Event shop currency Donation coins you can buy with them dressme,cosmetics and premium account Epic Fragments you can buy with them fake epic jewels Olympiad Tokens you can buy many items from olympiad shop (Hero Coin even items that are on next stages) Olympiad Win = 1000 Tokens / Lose = 500 Tokens ================================================================================= Offline Autofarm Allows limited Offline farming requires offline autofarm ticket that you get by voting etc ================================================================================= Grand Epics have Specific Custom NPC that can spawn Epics EU/LATIN TIME ZONE ================================================================================= First Olympiad Day 19 December First Heroes 22 December ( 21 December Last day of 1st Period) After that olympiad will be weekly. ================================================================================= Item price and economy Since adena is main coin of server and NOT donation coins we will always add new items in gm shop with adena in order to burn the adena of server and not be inflation . =================================================================================        
    • Hello, I'd like to change a title color for custom npc.  I created custom NPC, cloned existing. I put unique id for it in npcname-e, npcgrp and database. I have "0" to serverSideName in db, so that it would use npcname-e, but instead it has "NoNameNPC"and no title color change.
    • Trusted Guy 100% ,  I asked him for some work and he did it right away.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock