Naudingi sql kodai

Svarbu!
    
  1. Atsijungęs

    gerardas

    Pranešimai: 0

    Nulinis ( 0 ) Svoris daiktam:
    UPDATE `etcitem` SET `weight`=0 WHERE (SELECT item_id);
    UPDATE `armor` SET `weight`=0 WHERE (SELECT item_id);
    UPDATE `weapon` SET `weight`=0 WHERE (SELECT item_id);


    100% Adenu metimas is visu mobu:
    UPDATE `droplist` SET `chance`='1000000' WHERE `itemId`='57';


    Parduotant itemus shope ju kaina bus 0 adenu:
    UPDATE `armor` SET price=0 where price > 1;
    UPDATE `etcitem` SET price=0 where price > 1;
    UPDATE `weapon` SET price=0 where price > 1;


    Istrina visus pasaulio mobus iki 40lvl:
    DELETE spawnlist, npc FROM spawnlist, npc WHERE spawnlist.npc_templateid=npc.idTemplate AND npc.level<40 AND npc.type='L2Monster';


    Istrina visus materialus ir receptus is databazes:
    DELETE FROM droplist WHERE itemid IN (SELECT item_id FROM etcitem WHERE item_type= 'material' OR item_type= 'recipe' );


    Padidina metimo sansa receptam:
    UPDATE droplist SET chance='1000000' WHERE id IN (SELECT item_id FROM etcitem WHERE type='recipe');


    Istrina visus accountus kurie nebuvo prisijunge 3 menesius:
    DELETE FROM characters WHERE lastAccess < 466560000;
    DELETE FROM accounts WHERE lastactive < 466560000;


    Istrina spellbookus is databazes:
    DELETE FROM droplist WHERE itemid IN (SELECT item_id FROM etcitem WHERE item_type= 'spellbook' );


    Padidina guardu statusus:
    UPDATE npc SET pdef = pdef * 1.5 WHERE type = 'L2Guard';
    UPDATE npc SET hp = hp * 1.5 WHERE type = 'L2Guard';
    UPDATE npc SET patk = patk * 1.5 WHERE type = 'L2Guard';
    UPDATE npc SET mdef = mdef * 1.5 WHERE type = 'L2Guard';


    Nauju charackteriu atsiradimo vieta:
    UPDATE char_templates SET x=yourXcoordinate;
    UPDATE char_templates SET y=yourYcoordinate;
    UPDATE char_templates SET z=yourZcoordinate;


    Padidina visu zaideju statusus:
    UPDATE char_templates SET P_DEF = P_DEF * 1.1;
    UPDATE char_templates SET M_DEF = M_DEF * 1.1;


    Padidina visu zaideju begimo greiti:
    UPDATE char_templates SET MOVE_SPD = MOVE_SPD * 1.2;


    Padidina visu zaideju CP pasiekus tam tikra leveli:
    UPDATE lvlupgain SET defaultcpbase = Defaultcpbase * 1.66 WHERE class_lvl = '76';
    UPDATE lvlupgain SET defaultcpbase = Defaultcpbase * 1.44 WHERE class_lvl = '40';
    UPDATE lvlupgain SET defaultcpbase = Defaultcpbase * 1.22 WHERE class_lvl = '20';
    Paskutinį kartą redagavo: gerardas 11 Rugpjūčio 2013 - 17:19
    11 Rugpjūčio 2013 - 17:19 / #1
  2. 
  3. Atsijungęs

    wewewe

    Pavadinimas: L2 žaidėjas

    Narys

    Pranešimai: 727

    Vartotojo apdovanojimai: 16

    nu plius minus ok. Pradzioj tik nesuprantu kodel rasai
    UPDATE `etcitem` SET `weight`=0 WHERE (SELECT item_id);
    , kai galima tiesiog
    UPDATE `etcitem` SET `weight`=0;
    Paskutinį kartą redagavo: wewewe 12 Rugpjūčio 2013 - 14:53
    12 Rugpjūčio 2013 - 14:53 / #2