[Help Thread] Please post your questions here.

11/11/2017 19:35 YuhaBah#6646
My GS start crashing =(

The last, what i change is updating few contact scripts in NPCResource and trying to create own NPC script on .lua

- contact_script : 'custom_npc_girl_contact()'
- lua script called CustomNpcGirl.lua and code:
PHP Code:
function get_module_name()
             return 
"CustomNpcGirl"
end 

function custom_npc_girl_contact()

dlg_title("Таинственная девочка")
dlg_text("Добро пожаловать в наш скромный магазин")
dlg_menu("Cash shop items list 2", "open_market( 'some_market' )" )
dlg_menu("Armor and weapon supplies", "armor_and_weapon" )
dlg_menu('Бафнуть себя', 'buff_player()')
dlg_menu("Пока", '' )
dlg_show()

end

function buff_player()

    
local playerGold = get_value('gold')
    
    if 
playerGold >= 1000000
    
    sv
('playerGold', 'playerGold' - 1000000)
    
    
add_state(1013, 18, 900000)
    
buff_select_player()
    else
    
dlg_text("Подзаработай сначала!")
    
dlg_menu("Пока", "")
    
dlg_show()
end 


- GS error:
:feelsbadman: :feelsbadman: :feelsbadman: :feelsbadman:
11/11/2017 21:31 ThunderNikk#6647
You may want to try lowering the state level and or duration a little bit.

Some states were only designed to go so high and have been known to cause GS crashes when set too high.

Just something to try.
11/11/2017 21:56 YuhaBah#6648
Quote:
Originally Posted by ThunderNikk View Post
You may want to try lowering the state level and or duration a little bit.

Some states were only designed to go so high and have been known to cause GS crashes when set too high.

Just something to try.
You a wizard!

But i just try to delete this .lua from GS scripts and it start running!
May be i miss error in script?
11/11/2017 22:12 InkDevil#6649
@[Only registered and activated users can see links. Click Here To Register...]
You should check your functions for missing 'then' and 'end' ;) :)
And also don't include variables in functions with '

function buff_player()

local playerGold = get_value('gold')

if playerGold >= 1000000 then

sv('gold', playerGold - 1000000) ---deleted your ' here

add_state(1013, 18, 900000)
buff_select_player() ---what does this function calls?
else
dlg_text("Подзаработай сначала!")
dlg_menu("Пока", "")
dlg_show()
end
end
11/11/2017 22:16 YuhaBah#6650
Quote:
Originally Posted by LamiaCore View Post
@[Only registered and activated users can see links. Click Here To Register...]
You should check your functions for missing 'then' and 'end' ;) :)

function buff_player()

local playerGold = get_value('gold')

if playerGold >= 1000000 then

sv('playerGold', 'playerGold' - 1000000)

add_state(1013, 18, 900000)
buff_select_player()
else
dlg_text("Подзаработай сначала!")
dlg_menu("Пока", "")
dlg_show()
end
end
what a shame for me! ( its because im not accustomed to lua syntax ^^)


Thank you so much!!!
11/11/2017 22:22 InkDevil#6651
Quote:
Originally Posted by YuhaBah View Post
what a shame for me! ( its because im not accustomed to lua syntax ^^)


Thank you so much!!!
Changed/added a few more things/comments.
11/11/2017 22:32 YuhaBah#6652
Quote:
Originally Posted by LamiaCore View Post
Changed/added a few more things/comments.
Okay. But what about other function in lua? i saw, that func like 'open_market()' use with '
11/11/2017 22:39 InkDevil#6653
Quote:
Originally Posted by YuhaBah View Post
Okay. But what about other function in lua? i saw, that func like 'open_market()' use with '
Depending on the function which should call another function.
But definitely not for variables.
11/12/2017 01:57 ThunderNikk#6654
I went to the movies to see "IT" thanks for helping out LamiaCore.

I am not that well versed in .lua either, I use existing code to learn how to make my new code.

Takes me a bit.
11/12/2017 02:42 RashedGM#6655
Hi all

I want to open Rappelz without the GG
Because of a problem Game Hack
I use Client 7.3 Arabic version
I can not find SFrame 7.3 for Arabic version without GG

Can anyone help me

Thanks in advance
11/12/2017 03:04 Ghost Informatics#6656
Quote:
Originally Posted by RashedGM View Post
Hi all

I want to open Rappelz without the GG
Because of a problem Game Hack
I use Client 7.3 Arabic version
I can not find SFrame 7.3 for Arabic version without GG

Can anyone help me

Thanks in advance
put the SFrame here that you want to remove GG from!
11/12/2017 03:06 RashedGM#6657
Hi again
And there is another thing
I Create NPC for buying Pets from Players


function Rashed_Creature_Sale1()

local item_count = find_item ( 540002 )
local gold = get_value( "gold" )

if item_count >= 1 then
set_value( "gold", gold + 1500000 )
update_gold_chaos()
delete_item( get_item_handle( 540002 ), 1 )

dlg_title( "name" )
dlg_text( "name" )
dlg_menu( "name" , "Rashed_Sale()" )
dlg_menu( "name", '' )
else
dlg_title( "name" )
dlg_text( "name" )
dlg_menu( "name" , "Rashed_Sale()" )
dlg_menu( "name", '' )
return

end
end



Here

The problem is that NPC can not differentiate between
Tamed Pets or not
I want to make it buy empty card ( not Tamed )


I really want this help

Thanks again
11/12/2017 03:17 RashedGM#6658
Quote:
Originally Posted by Ghost Informatics View Post
put the SFrame here that you want to remove GG from!
Here
11/12/2017 09:13 YuhaBah#6659
Quote:
Originally Posted by RashedGM View Post
Hi again
And there is another thing
I Create NPC for buying Pets from Players

Here

The problem is that NPC can not differentiate between
Tamed Pets or not
I want to make it buy empty card ( not Tamed )


I really want this help

Thanks again
As i know, in the oficial server same thing, that tamet card = empty card for NPC.
11/12/2017 10:17 RashedGM#6660
Quote:
Originally Posted by YuhaBah View Post
As i know, in the oficial server same thing, that tamet card = empty card for NPC.
But it has something to do with

local q_flag0 = tonumber( get_flag( "q20" ) )

if q_flag0 == nil then
q_flag0 = 0
set_flag( "q20", "0" )
end

or

local local_flag = get_env( "game.local_flag" )
if local_flag == 1
set_flag( "lvup_weapon", "1")


But I do not know what it is
I tried a lot and did not solve it
And so I asked you here
Ty