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

    • Contact me, Discord: xbaus
    • Hi,   I’m reporting @nuturazvan for attempting to scam me out of 70€.   Last week, he contacted me on Discord saying he was looking for a control panel. I initially offered NimeraCP, but after I told him the price, he said he couldn’t afford it. I then told him I could develop a custom control panel within his budget. After discussing the details, we agreed on the following:   Control / Donate Panel includes: Donate page Account registration page Login page Password reset page Stripe integration Agreed price: 70€ Deal date: December 3, 2025   I finished developing the panel on December 6, 2025, but I have not delivered it yet. The code is complete and currently sitting in a private GitHub repository, waiting for payment. As of December 14, 2025, I still haven’t received any payment. I’ve asked him multiple times when I can expect it, and he keeps making excuses, saying a friend owes him money and that he’s waiting to get paid first.   If you don’t have the money, you shouldn’t be ordering work. I take responsibility for starting the work without upfront payment, but that doesn’t excuse repeatedly delaying payment.   Posting this as a warning to others.  
    • WTB GRACIA FINAL INTERFACE
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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