[Python Code] Effects achievement load in -> LUA

Conectat
Avatar utilizator
VegaS™
Developer
Developer
Mesaje: 207
Membru din: 30 Oct 2015
Localitate: Timișoara
Mulțumiri acordate: 61
Mulțumiri primite: 75
Contact:

[Python Code] Effects achievement load in -> LUA

Mesajde VegaS™ » 30 Mai 2016, 22:43

[12.05.2016 0:50:25] VegaS™: you have command 100 command for load effect? 
[12.05.2016 0:50:31] PAnonymous <3: 100 commands yes..:(
[12.05.2016 0:50:35] VegaS™: not good my friend
[12.05.2016 0:50:37] PAnonymous <3: i'm really noob in python
[12.05.2016 0:50:42] VegaS™: you can make with argument
[12.05.2016 0:50:44] VegaS™: only 1 command and loaded all function via game
[12.05.2016 0:50:53] VegaS™: you fuck client with this method
[12.05.2016 0:50:57] PAnonymous <3: i don't know it... yeah :D
[12.05.2016 0:51:00] PAnonymous <3: as you said
[12.05.2016 0:52:25] PAnonymous <3: i really don't know how to make, maybe you help me with your best code?


Old function from him:

Trebuie să fii logat sau înregistrat pentru a vedea acest link.
Trebuie să fii logat sau înregistrat pentru a vedea acest link.

Fuck with this shit code.

Now to start with my code:

Imagine

root/game.py:

# 1.) Search:
"xmas_boom"				: self.__XMasBoom_Enable,

# 2.) Add a line below:
"effect_achievement"				: self.ShowEffectAchievementbyVegaS,


# 3.) Add to end of script:

def ShowEffectAchievementbyVegaS(self, name_effect):
################################
# Dev: VegaS #
# Date: 12/05/2016 #
# Time finished: 02:20 #
# Script: Effects achievement #
################################
import AchievementCommand as net
effect_table_achievement_vegas = {
"points_5" : "(points_5)",
"points_10" : "(points_10)",
"points_15" : "(points_15)",
"points_20" : "(points_20)",
"points_25" : "(points_25)",
"points_30" : "(points_30)",
"points_35" : "(points_35)", #
"points_40" : "(points_40)",
"points_45" : "(points_45)",
"points_50" : "(points_50)",
"points_55" : "(points_55)",
"points_60" : "(points_60)",
"points_65" : "(points_65)",
"points_70" : "(points_70)",
"points_75" : "(points_75)",
"points_80" : "(points_80)",
"points_85" : "(points_85)",
"points_90" : "(points_90)",
"points_100" : "(points_100)",
"points_110" : "(points_110)",
"points_120" : "(points_120)",
"points_130" : "(points_130)",
"points_140" : "(points_140)",
"points_150" : "(points_150)",
"points_200" : "(points_200)",
"points_250" : "(points_250)",
"points_300" : "(points_300)",
"points_350" : "(points_350)",
"points_400" : "(points_400)",
"points_450" : "(points_450)",
"points_500" : "(points_500)",}

if effect_table_achievement_vegas.has_key(name_effect):
AchievementCommand.SendChatPacket(effect_table_achievement_vegas[name_effect])


root/playerSettingsModule.py:

"""newFunctionEffect = {
"GetIndexNumber" : {
0 : 12,
1 : 13,
},
tNumberMode = newFunctionEffect["GetIndexNumber"][Row01]"""

effect_table_achievement = [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84
85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]


effect_table_msm = ["d:/ymir work/achievement/points_5.mse","d:/ymir work/achievement/points_10.mse","d:/ymir work/achievement/points_15.mse",
"d:/ymir work/achievement/points_20.mse","d:/ymir work/achievement/points_25.mse","d:/ymir work/achievement/points_30.mse"]


effect_table_send_command = ["(points_5)","(points_10)","(points_15)",
"(points_20)","(points_25)","(points_30)"]


chrmgr.RegisterEffect(chrmgr.EFFECT_EMOTICON + effect_table_achievement[0], "", effect_table_msm[0])
AchievementCommand.RegisterEmoticonString(effect_table_send_command[0])


root/uiChat.py - Block command:

def __SendChatPacket(self, text, type):	
efect_table_command = ["(points_5)","(points_10)","(points_15)","(points_20)","(points_25)","(points_30)","(points_35)","(points_40)","(points_45)",
"(points_50)","(points_55)","(points_60)","(points_65)"]
for x in xrange(len(efect_table_command)):
if text == efect_table_command[x]:
return



yourQuest.lua (Example):

cmdchat("effect_achievement points_5")


points_5 is argument from table, for other effect you can use points_10,points_15 etc, is loaded other effect via mse.

Example:

quest vegas_test_lua_function begin
state start begin
when kill with npc.is_pc() begin
local vegas_eff_1 = "points_5"
say("Effect loaded: "..vegas_eff_1.."")
cmdchat("effect_achievement points_5")
end
end
end

Conectat
Avatar utilizator
VegaS™
Developer
Developer
Mesaje: 207
Membru din: 30 Oct 2015
Localitate: Timișoara
Mulțumiri acordate: 61
Mulțumiri primite: 75
Contact:

Re: [Python Code] Effects achievement load in -> LUA

Mesajde VegaS™ » 26 Iun 2016, 22:32

A problem with table from sendpacket was fixed.


Înapoi la “Altele”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: [DEV]Solitude, andrewxherrera, razvan18, robertynio1234, sury1210 și 7 vizitatori