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

    • We are excited to announce the open beta testing of the Fulgrim x4 server, starting November 29th, 2024, at 19:00 server time (19:00 по МСК). There will be an NPC available on the test server from whom you can purchase items, gain levels, professions, and other services.   More information at our >Forum
    • Server mid rate craft PvP   CLIENTE INTERLUDE Website server Discord olympus x25 &nbsp;server 🇧🇷🇦🇷🇨🇱🇬🇷🇲🇽🇵🇪🇸🇰🇪🇸🇺🇾 Server mid rate craft PvP 🔱CLIENTE INTERLUDE🔱 🔅xpx25 🔅Sp x25 🔅Adena x15 🔅Droop x2 🔅Spoil x2 🔅Raidboss xp x2 🔅Raidboss sp x2 🔅Raidboss droop x1 🔅All Rate quest reward  x1 ⚠️All Quest drop reward. x1 🔅Manor x 3 🔅Seal stone x1 🛡️🗡️INFO GRADO S🗡️🛡️ ⚠️Inicia desabilitado drop/spoil/quest. 🔱PROFESIONES/SUBCLASS🔱 🛡️1st profession - 50medal 🛡️2nd profession - 500 medal 🛡️3rd profession - 1k medal +30kk adena 🛡️Sub class - Quest. No necesita matar raids. ⚙️Configuraciones⚙️ 🛡️Gmshop  grade - B. 🛡️Grade A-S Craft - yes x1 chance 🛡️Globlal teleport - yes 🛡️Buffer 1hora. 🛡️Buffer slot 24(+4divine)+12 dances-song 🛡️Auto learn skils - yes 🛡️Autoloot - yes 🛡️Mana potion recarga 1000 ,9segundos delay. 🛡️Champions system:     ▫️lvl 30 - 76     ▫️chance respawn 0.5%.     ▫️adena x20 🛡️Max lvl party 14 lvl. 🛡️Festive sweeper on. 🛡️Max client pc 2. 🛡️Raid boss respawn retail. 🛡️Nobleza quest - yes. 🛡️Barakiel respawn 6 horas + -30 min. 🛡️Olimpiada duracion 14 dias. 🛡️Olimpiada de 18:00 a 00:00 🛡️Safe enchant +3 🛡️Normal enchant scroll 50% ⚠️+11-16 chance 30% 🛡️Bleesed enchant scroll 55% ⚠️+11-16 chance 35% 🛡️Rate dinamico x1 lvl 77-80   🛡️🗡️CLANES INFO🗡️🛡️ 🔅Crear clan min. level 20 🔅Max Alianzas 1 🔅Duracion penalidades clan / alianzas 8 horas. 🔅Cambio de lider 24 horas. 🛡️⚔️ ASEDIOS ⚔️🛡️ 🔅Cada 2 semanas. 🔅Proteccion hwid 1 pc. 🔅Clanes registrados. acceden a zona de asedio. 🔅Castillo asediable Aden. 🔅Reward 1000 FA 🔅Horario 16:00 GMT-3 🎊PACK DE INICIO🎊 🔅Start set - armor\weapon no grade. 🔅Level 20  - 5 shadow cuppon grado D 🔅Level 40 - 5 shadow cuppon grado C 🔅Free Autofarm 24 horas. 💰 INFO PREMIUM 💰 🔅Free autofarm. 🔅xp x30 🔅sp x30 🔅adena x17 🔅drop x4 🔅spoil x4 🔅enchant +2% 🔅seal stone x1 🔅Altb Gk-Gmshop/buffe ⚔️ RAID  BOSS INFO ⚔️ 🔅Raid boss 70 ++ respawn 5 días despues. 🔅Raid boss 75 ++ respawn 15 días despues 🔅Drop LETTER L2DAY para tradear en GMshop. ⚔️ INFO SEVEN SING ⚔️ 🔅Inicio del drop Seal stones dia 5 de iniciado el server. 🎊 EPIC RAID INFO 🎊 🔅Queen Ant (lvl 40)respawn Lunes a Viernes 22:00 GMT-3 drop chance 30%. 🔅Core (lvl 80)respawn Martes-miercoles 20:20 GMT-3 drop chance 100%. 🔅Orfen (lvl 80)respawn Martes-miercoles 21:00 GMT-3 drop chance 100%. 🔅Zaken (lvl 80)respawn Jueves 23:00 GMT-3 drop chance 100%. 🔅Frintezza (lvl 80)respawn Viernes 23:00 GMT-3 drop chance 100%. 🔅Baium (lvl 80)respawn Sabado 22:00 GMT-3 drop chance 100%. 🔅Valakas (lvl 80)respawn Domingo 20:00 GMT-3 drop chance 100%. 🔅Antharas (lvl 80)respawn Domingo 22:00 GMT-3 drop chance 100%.
  • Topics

×
×
  • Create New...