Jump to content

Recommended Posts

Posted

Author: AlexMan

# Created by Ham Wong on 2007.02.28

import sys

 

from net.sf.l2j.gameserver.model.quest        import State

from net.sf.l2j.gameserver.model.quest        import QuestState

from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "2400_toivortex_exit"

NPC=[29055]

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onTalk (Self,npc,player):

    chance = st.getRandom(3)

    if chance == 0:

      x=108784+st.getRandom(100)

      y=16000+st.getRandom(100)

      z=-4928

    elif chance == 1:

      x=113824+st.getRandom(100)

      y=10448+st.getRandom(100)

      z=-5164

    else:

      x=115488+st.getRandom(100)

      y=22096+st.getRandom(100)

      z=-5168

    player.teleToLocation(x,y,z)

    st.exitQuest(1)

    return

 

QUEST      = Quest(2400,qn,"Teleports")

 

for item in NPC:

  QUEST.addStartNpc(item)

  QUEST.addTalkId(item)

Posted

I think it's useless.

Anyway, much better to code it on java.

Also better to do it with onFirstTalk (?) If you are not gonna give multiple options to the player.

Posted

I think it's useless.

Anyway, much better to code it on java.

Also better to do it with onFirstTalk (?) If you are not gonna give multiple options to the player.

there are three areas which will receive a random teleport

Posted

Yea.. I have seen it. But these 3 areas are randomly choosen, so you are only giving 1 option to the player and depending on his luck will teleport to 1 of these 3 areas...

  • 10 months later...
Posted

easy code

 

next time share it before someone else since its easy and dont spam , next time u post something like this i will dekarma u ....

 

On Topic :

 

Nice work mate

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...