Эх сурвалжийг харах

BETA: Typo and multiplier fixes for A Looter and a Railroad man.

DrLecter 14 жил өмнө
parent
commit
3101a8aedc

+ 1 - 1
L2J_DataPack_BETA/data/scripts/quests/649_ALooterAndARailroadMan/32052-0.htm

@@ -1,5 +1,5 @@
 <html><body>Railroad Worker Obi:<br>
-This area has gone to hell lately! The security was never that great, but once there were merchants and warehouses, security gaurds and adventurers... But that was a long time ago...<br>
+This area has gone to hell lately! The security was never that great, but once there were merchants and warehouses, security guards and adventurers... But that was a long time ago...<br>
 Now they're all gone! All that's left is this old, worn-out railroad station and the Bandits who rob anyone foolish enough to come here!<br>
 How would you like a job?<br>
 <a action="bypass -h Quest 649_ALooterAndARailroadMan 32052-1.htm">"Tell me more about the Bandits."</a>

+ 1 - 1
L2J_DataPack_BETA/data/scripts/quests/649_ALooterAndARailroadMan/32052-0a.htm

@@ -1,5 +1,5 @@
 <html><body>Railroad Worker Obi:<br>
-This area has gone to hell lately! The security was never that great, but once there were merchants and warehouses, security gaurds and adventurers... But that was a long time ago...<br>
+This area has gone to hell lately! The security was never that great, but once there were merchants and warehouses, security guards and adventurers... But that was a long time ago...<br>
 Now they're all gone! All that's left is this old, worn-out railroad station and the Bandits who rob anyone foolish enough to come here!<br>
 I would offer you a job, but I'm afraid you're not up for it yet.<br>
 (Only characters of level 30 and above may undertake this quest.)

+ 12 - 7
L2J_DataPack_BETA/data/scripts/quests/649_ALooterAndARailroadMan/__init__.py

@@ -1,5 +1,6 @@
 # Made by Kilkenny
 import sys
+from com.l2jserver import Config
 from com.l2jserver.gameserver.model.quest import State
 from com.l2jserver.gameserver.model.quest import QuestState
 from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
@@ -66,13 +67,17 @@ class Quest (JQuest) :
    if st :
      if st.getState() == State.STARTED :
        count = st.getQuestItemsCount(THIEF_GUILD_MARK)
-       if st.getInt("cond") == 1 and count < 200 and st.getRandom(100)<DROP_CHANCE :  
-          st.giveItems(THIEF_GUILD_MARK,1)  
-          if count == 199 :  
-            st.playSound("ItemSound.quest_middle")  
-            st.set("cond","2")  
-          else:  
-            st.playSound("ItemSound.quest_itemget") 
+       numItems, chance = divmod(DROP_CHANCE * Config.RATE_QUEST_DROP,100)
+       if st.getInt("cond") == 1 and count < 200 :
+         if st.getRandom(100) < chance :
+           numItems += 1
+         if numItems :
+           st.giveItems(THIEF_GUILD_MARK,int(numItems))
+         if count == 199 :  
+           st.playSound("ItemSound.quest_middle")  
+           st.set("cond","2")  
+         else:  
+           st.playSound("ItemSound.quest_itemget") 
    return
 
 QUEST       = Quest(649,qn,"A Looter and a Railroad Man")