masone Posted July 28, 2012 Posted July 28, 2012 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) Quote
^Wyatt Posted July 28, 2012 Posted July 28, 2012 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. Quote
masone Posted July 28, 2012 Author Posted July 28, 2012 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 Quote
^Wyatt Posted July 28, 2012 Posted July 28, 2012 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... Quote
TheMentaL Posted June 18, 2013 Posted June 18, 2013 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 Quote
Recommended Posts
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.