Jump to content
TheSamurai

About bank

Recommended Posts

3 часа назад, TheSamurai сказал:

How i can make an item that can't be put on the bank? Do i need to edit iteminfo line only?

Yes, there is a special field (number 17) in ItemInfo.txt . Do not forget to edit both server and client ItemInfo.txt


Share this post


Link to post
Share on other sites

@V3ct0r number 17 of iteminfo.txt is tradable or not i think. maybe it's a different one.


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

I dont know if iteminfo has anything to do with this or not, but i've no success to make items unbankable via iteminfo.

so some years ago i did some hooks.
Also,

if(pItem->sType == enumItemTypeBoat || pItem->sType == enumItemTypeTrade || pItem->sType == enumItemTypeBravery)

btw, enumItemTypeBravery = 46 (medal valor), enumItemTypeTrade = 45 (commerce i think) <- these should be defined in common.
so, instead of "pointing to" type, try itemid


kong.png

a2.png

Share this post


Link to post
Share on other sites
В 09.09.2016 в 09:39, Shako сказал:

@V3ct0r number 17 of iteminfo.txt is tradable or not i think. maybe it's a different one.

So it's close. Maybe 16 or 18.

 

Anyway you can take an item which is can't be put on the bank (as @Foxseiz said - Medal of Valor) and compare it with your item.

 

@KONG you think it is hardcoded in Game.exe?


Share this post


Link to post
Share on other sites

GameServer. but I can't remember.

if someone don't mind, can someone copy medal of valor iteminfo line, and change the item type 46 to 22 or another value

and check if it is still bank able 


kong.png

a2.png

Share this post


Link to post
Share on other sites

Ok, I just checked. It is hardcoded in Gameserver. Maybe later i will make a guide to add unbankable column to iteminfo, or if I can find my old mods, I'll release it here., 

  • Like 3

kong.png

a2.png

Share this post


Link to post
Share on other sites

@TheSamurai I guess the way to do it simply (with some predicted problems) is to change the item's type to 46 xD


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
1 hour ago, TheSamurai said:

@Foxseiz @Shako Thank you guys, yes i compared the Medal of Valor line and i notice the itemtype, i tried it and yes it works. Also thank to those who tried to help :D appreciated guys!

what did you do?


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

sorry for late revival of thread again.
https://www.dropbox.com/s/i07vrwwmhb4e0xx/GameServerDLL.dll?dl=0

Note that there is popupnotice and getplayerbyname inside the DLL as well (in c++), made for @Shako
The other funciton is CanBankItem (naked asm) <- src codes not included because the src will reveal itself if placed into any debugger.

function CanBankItem(role, itemid, itemtype)
  if itemtype == 45 or itemtype == 46 or itemtype == 43 or itemid == 825 then
    return 0
  end
  return 1 -- bankable
end


-- itemtypes 45/46/43 unbankable and itemid 825 (kylin armor) not bankable


The other method (iteminfo column) is a bit harder to do because it requires much more editing to existing codes.
This method, I don't know about performance but atleast, itemids and itemtypes can be changed at runtime after an updateall.
This is currently for 1.36

  • Like 1

kong.png

a2.png

Share this post


Link to post
Share on other sites
22 hours ago, KONG said:

sorry for late revival of thread again.
https://www.dropbox.com/s/i07vrwwmhb4e0xx/GameServerDLL.dll?dl=0

Note that there is popupnotice and getplayerbyname inside the DLL as well (in c++), made for @Shako
The other funciton is CanBankItem (naked asm) <- src codes not included because the src will reveal itself if placed into any debugger.

Sorry for off-topic, bit interested in the DLL.

 

Does the "GetPlayerByName" function make it part of the GS? So we don't have to store roles on variables nor go through players in a map copy?

Mind explaining a bit on the PopUpNotice? 

Share this post


Link to post
Share on other sites
1 hour ago, Angelix said:

Does the "GetPlayerByName" function make it part of the GS? So we don't have to store roles on variables nor go through players in a map copy?

This is precisely it. 

 

For PopupNotice, I was roaming on sky-pirates.net (@Sultan's server) and saw a nice little message that caught my interest. I'm sure sultan won't mind me posting this picture

 

 

IMG_2506.PNG

  • Like 1

kong.png

a2.png

Share this post


Link to post
Share on other sites
18 minutes ago, KONG said:

This is precisely it. 

 

For PopupNotice, I was roaming on sky-pirates.net (@Sultan's server) and saw a nice little message that caught my interest. I'm sure sultan won't mind me posting this picture

 

 

IMG_2506.PNG

Nice! Like the PlayerByName function and the notice seems great, kinda like the notice from when server is disconnected. Though I never seen that message box pop up thing. :P

Share this post


Link to post
Share on other sites
On 16/11/2016 at 3:59 AM, KONG said:

sorry for late revival of thread again.
https://www.dropbox.com/s/i07vrwwmhb4e0xx/GameServerDLL.dll?dl=0

Note that there is popupnotice and getplayerbyname inside the DLL as well (in c++), made for @Shako
The other funciton is CanBankItem (naked asm) <- src codes not included because the src will reveal itself if placed into any debugger.


function CanBankItem(role, itemid, itemtype)
  if itemtype == 45 or itemtype == 46 or itemtype == 43 or itemid == 825 then
    return 0
  end
  return 1 -- bankable
end

 


-- itemtypes 45/46/43 unbankable and itemid 825 (kylin armor) not bankable


The other method (iteminfo column) is a bit harder to do because it requires much more editing to existing codes.
This method, I don't know about performance but atleast, itemids and itemtypes can be changed at runtime after an updateall.
This is currently for 1.36

link broken can reupload? and teach how works gameserverdll?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...