Python scripto logika

    
  1. Atsijungęs

    domis045

    Pranešimai: 0

    Sveiki, taigi scriptas kaip ir veikia, bet meto errorus ant xp,adena vietos davimo. Gal obj id neturiu killer, nezinau gal kas galetumet pagelbeti :).
    # Rewritten by Qwerty
    import sys
    from com.l2jfrozen.gameserver.model.quest import State
    from com.l2jfrozen.gameserver.model.quest import QuestState
    from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
    from com.l2jfrozen.gameserver.network.serverpackets import CreatureSay
    from com.l2jfrozen.gameserver.network.serverpackets import PlaySound
    print "Training dummy xp: [ON]"
    qn = "Training Dummy"
    
    class Quest (JQuest) :
    	def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
    	
    	def onKill(self,npc,player,isPet):
    		st = player.getQuestState(qn)
    		objId=npc.getObjectId()
    		zaidejas=player.getObjectId()
    		npc.broadcastPacket(CreatureSay(objId,0,"Training Dummy", "Ouch that hurt....."))
    		if player.getLevel() >= 1 and player.getLevel() <= 20:
    			npc.broadcastPacket(CreatureSay(objId,0,"Training Dummy", "Ouch that hurt....."))
    			#zaidejas.playSound("ItemSound.quest_finish")
    			addExpAndSp(219975,13047)// sicia visa stulpeli
    			zaidejas.addExpAndSp(219975,13047)
    			zaidejas.giveItems(57, 69146)
    	
    QuestId     = 4080
    QuestName   = "Training Dummy"
    QuestDesc   = "LVL For Training Dummy"
    QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
    CREATED=State('Start',QUEST)
    QUEST.setInitialState(CREATED)
    QUEST.addKillId(50022)
    
    
    13 Vasario 2014 - 17:17 / #1
  2. 
  3. Atsijungęs

    wewewe

    Pavadinimas: L2 žaidėjas

    Narys

    Pranešimai: 727

    Vartotojo apdovanojimai: 16

    player.addExpAndSp
    player.giveItems...
    13 Vasario 2014 - 17:21 / #2
  4. 
  5. Atsijungęs

    domis045

    Pranešimai: 0

    bandziau bet nejo, hmm reikia pabandyt, jei taip lengva tai gerai apsisoviau :D
    pff jap apsisoviau :D, dekui, jau galvojau nebepadarysiu tokio dalyko :D
    Paskutinį kartą redagavo: domis045 13 Vasario 2014 - 17:25
    13 Vasario 2014 - 17:21 / #3