xuebao

天龙笔记二

xuebao 天龙笔记 2024-05-03 1162浏览 0

--LuaFnSetHumanCacheData(sceneId,selfId,31,99811)   

--角色临时数据  下线销毁  在线期间可用于角色的全局 只有32个 0-31 需要在全局中查看避免重复

--local bagpos=TryRecieveItem(sceneId, selfId, 33000111, 1)

--local bagpos = GetBagPosByItemSn(sceneId, selfId, 33000111)

-- local bagpos=0

-- SetBagItemParam( sceneId, selfId, bagpos, 4, 2, 50000000 ) --设置最大次数

-- SetBagItemParam( sceneId, selfId, bagpos, 8, 2, 3000 ) --设置已用次数

--SetBagItemParam( sceneId, selfId, bagpos, 4, 2, 500000 )注释

--第三个参数为背包中的位置

--第四个参数为数据起始位 

--第五个参数为数据类型  

--0 CHAR 0-11  每个数据占一个字节数据内容为(-127----127) 此时可用起始位为0-11

--1 SHORT  0-10  每个数据占两个字节 有效数据内容为 -32767-----32767  注意此时可用起始位为0  2  4  6  8   10

--2 INT   0-8  每个数据占四个字节  有效数据内容为 -2147483647----2147483647  注意此时可用起始位为 0   4   8

--第六个参数为数据内容

local a=GetBagItemParam(sceneId, selfId, bagpos, 4, 2)

-- LuaFnRefreshItemInfo( sceneId, selfId, bagpos ) --刷新背包信息

local str= "&XB("..strrep("%d",8)..")".."(%w)".."("..strrep("%d",8)..")".."(%w)".."("..strrep("%d",8)..")"

local str1="&XB10001000X10002000X10003000"

local str1="&XB10001000X10002000X00000000"

local tmp_1,tmp_2,tmpID_1,fgf_1,tmpID_2,fgf_2,tmpID_3 = strfind(str1,str)

local strl=strlen(str1)

BeginEvent( sceneId )

-- AddText( sceneId, "a: "..tostring(a))

AddText( sceneId, "strlen: "..tostring(strl))

AddText( sceneId, "tmp_1 tmp_2: "..tostring(tmp_1).."  "..tostring(tmp_2))

AddText( sceneId, "fgf_1 fgf_2: "..tostring(fgf_1).."  "..tostring(fgf_2))

AddText( sceneId, "tmpID_1 tmpID_2  tmpID_3:"..tostring(tmpID_1).."  "..tostring(tmpID_2).."  "..tostring(tmpID_3))

AddNumText( sceneId, x830002_g_ScriptId, "#G返回上一页", 6, 101)

EndEvent( sceneId )

DispatchEventList( sceneId, selfId, targetId )


发表评论
«    2025年1月    »
12345
6789101112
13141516171819
20212223242526
2728293031
搜索
请先 登录 再评论,若不是会员请先 注册