From 41ece4b51fb2a75ac049d88b1e9c67e124862a24 Mon Sep 17 00:00:00 2001
From: cehua_LC <tingame100@163.com>
Date: 星期五, 28 九月 2018 15:10:23 +0800
Subject: [PATCH] 1889 神兽副本NPC配置

---
 ZoneServerGroup/map1_8G/MapServer/MapServerData/MapServerConfig/HackCheater/Cheater_PYCode/PYCode_5.txt |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/ZoneServerGroup/map1_8G/MapServer/MapServerData/MapServerConfig/HackCheater/Cheater_PYCode/PYCode_5.txt b/ZoneServerGroup/map1_8G/MapServer/MapServerData/MapServerConfig/HackCheater/Cheater_PYCode/PYCode_5.txt
new file mode 100644
index 0000000..4419ce5
--- /dev/null
+++ b/ZoneServerGroup/map1_8G/MapServer/MapServerData/MapServerConfig/HackCheater/Cheater_PYCode/PYCode_5.txt
@@ -0,0 +1,51 @@
+#用3引号包含,注意缩进
+("""
+def GetCodeStrExecResult(curPlayer, inMsg):
+    import md5
+    import math
+    key = "from zero to hero"
+
+    md5Msg = md5.md5(inMsg).hexdigest()
+
+    minChar = md5Msg[0]
+    randChar = md5Msg[11]
+    
+    curPower = ord(minChar) + ord(randChar)
+
+    curJob = 11
+    curSex = 22
+    
+    if hasattr(curPlayer, 'GetJob'):
+        curJob = curPlayer.GetJob()
+    elif hasattr(curPlayer, 'Job'):
+        curJob = curPlayer.Job()
+        
+    if hasattr(curPlayer, 'GetSex'):
+        curSex = curPlayer.GetSex()
+    elif hasattr(curPlayer, 'Sex'):
+        curSex = curPlayer.Sex()
+    
+    tmpNum = curJob*2%2
+    
+    floatNum = 0.12783
+    if tmpNum == 0:
+        floatNum = float(curJob*3)/7
+    elif tmpNum == 1:
+        floatNum = float(curJob*curSex + 1)/7
+    
+    floatNum = round(floatNum, 4)
+    calValue = math.pow(2, curPower)
+    
+    resultStr = md5.md5(md5.md5('%s%s'%(calValue, floatNum)).hexdigest() + key + md5Msg).hexdigest()
+    
+    numStr = ''
+    for i in [13, 7, 17]:
+        numStr += str(ord(resultStr[i]))
+    
+    tmpNum = 0
+    for j in [7, 12, 4]:
+    	tmpNum += ord(resultStr[i])
+    
+    return tmpNum + int(numStr)
+"""
+)
\ No newline at end of file

--
Gitblit v1.8.0