设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 5243|回复: 6
打印 上一主题 下一主题

[原创发布] 鸡肋脚本·伪·友好度

[复制链接]

Lv1.梦旅人

梦石
0
星屑
138
在线时间
304 小时
注册时间
2014-4-11
帖子
419
跳转到指定楼层
1
发表于 2016-6-20 13:02:57 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 fox1313304 于 2016-10-8 20:49 编辑


其实只是一个判断方法 比较冗长事件脚本写不下 就写到脚本里了
第一次给论坛做贡献 虽然是个很鸡肋的脚本 但是对于完全不会脚本的人来说还是有些用处的吧
虽然事件也可以实现但是这个省了不少事

==============================第一次编辑的分割线=====================================



图1:实际显示效果



图2:事件设置



图3:效果预览



图4:随机聊天效果

其实就是3个方法 打开就会发现十分直观好改。

JH_Friendship.zip

1.64 KB, 下载次数: 181

评分

参与人数 2星屑 +20 收起 理由
952193683 + 10 认可答案
在野月光 + 10 塞糖

查看全部评分

人生是一场漫长的自杀。

Lv5.捕梦者

梦石
0
星屑
21977
在线时间
8570 小时
注册时间
2011-12-31
帖子
3362
2
发表于 2016-6-20 15:20:46 | 只看该作者
Conditional Branch+ v1.0
判断拡張脚本
* Combining Checks
* Use "&&", "||", and "()" to combine several checks in a conditional branch.
*   && = this AND that are true
*   || = this OR that are true
*   () = order of operations, check innermost parentheses first
*   !  = translates to NOT. EX. !Check.has(1) checks if player DOESN'T have
*        item id 1 in their inventory.
*
* -- EX: (Check.has(1) && Check.greater(1 , 0)) || Check.has(2)
* -- Checks if player has item 1 and variable 1 > 0, or player has item 2.
* ==============================================================================
*  Possible Checks
* ------------------------------------------------------------------------------
*    Items
* ------------------------------------------------------------------------------
* Check.has(*items)
* -- EX: Check.has(1, 3, 4)
* -- checks if player has items 1, 3, and 4 in inventory.
*
* Check.has_more(*items, number)
* -- EX: Check.has_more(1, 2, 3, 4, 5)
* -- checks if player has at least five (includes 5) of items 1, 2, 3, 4.
*
* Check.has_less(*items, number)
* -- EX: Check.has_less(1, 2, 3, 4, 5)
* -- checks if player has at most five (includes 5) of items 1, 2, 3, 4.
*
* Check.has_any(*items)
* -- EX: Check.has_any(1, 3, 4)
* -- checks if player has either item 1, 3, or 4 in inventory.
*
* Check.each_more(*[item, number])
* -- EX: Check.each_more([1, 2], [2, 4])
* -- checks if there are at least 2 of item 1 and at least 4 of item 2.
*
* Check.each_less(*[item, number])
* -- EX: Check.each_less([1, 2], [2, 4])
* -- checks if there are at most 2 of item 1 and at most 4 of item 2.
* ------------------------------------------------------------------------------
*    Variables
* ------------------------------------------------------------------------------
* Check.is_any(variable, *values)
* -- EX: Check.is_any(1, 3, 4, 5)
* -- checks if variable 1 is either 3, 4, or 5.
*
* Check.greater(*variables, value)
* -- EX: Check.greater(1, 2, 3, 5)
* -- checks if variables 1, 2, and 3 are at least 5.
*
* Check.lesser(*variables, value)
* -- EX: Check.lesser(1, 2, 3, 5)
* -- checks if variables 1, 2, and 3 are at most 5.
*
* Check.in_range(*variables, start, stop)
* -- EX: Check.in_range(1, 3, 4, 5)
* -- checks if variable 1 AND 3 are between 4 and 5, including 4 and 5.
*
* Check.any_inrange(*variables, start, stop)
* -- EX: Check.any_inrange(1, 3, 4, 5)
* -- checks if variable 1 OR 3 are between 4 and 5, including 4 and 5.
*
* Check.each_is(*[variable, value])
* -- EX: Check.each_is([1, 3], [4, 5])
* -- checks if variable 1 is 3, and variable 4 is 5.
*
* Check.each_greater(*[variable, value])
* -- EX: Check.each_greater([1, 3], [4, 5])
* -- checks if variable 1 is at least 3 and variable 4 is at least 5.
*
* Check.each_lesser(*[variable, value])
* -- EX: Check.each_lesser([1, 3], [4, 5])
* -- checks if variable 1 is at most 3 and variable 4 is at most 5.
*
* Check.each_inrange(*[variable, start, stop])
* -- EX: Check.in_range([1, 3, 5], [3, 1, 4])
* -- checks if variable 1 is between 3 and 5, and variable 3 is between 1 and 4.
* ------------------------------------------------------------------------------
*    Switches
* ------------------------------------------------------------------------------
* Check.all_true(*switches)
* -- EX: Check.true(1, 2, 3)
* -- checks if switches 1, 2, 3 are true.
*
* Check.any_true(*switches)
* -- EX: Check.any_true(1, 2, 3)
* -- checks if either of switches 1, 2, 3 are true.
*
* Check.all_false(*switches)
* -- EX: Check.false(1, 2, 3)
* -- checks if switches 1, 2, 3 are false.
*
* Check.any_false(*switches)
* -- EX: Check.any_false(1, 2, 3)
* -- checks if either of switches 1, 2, 3 are false.
*
* Check.each_switch(*[switch, on/off])
* If on, put 1. If off, put 0.

点评

一头雾水  发表于 2016-6-20 15:57
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
73 小时
注册时间
2016-4-6
帖子
39
3
发表于 2016-6-20 18:09:11 | 只看该作者
本帖最后由 iceBOXz 于 2016-6-20 19:01 编辑

我流中文翻譯一下   很實用  裡面還有一些例子
* Use "&&", "||", and "()" to combine several checks in a conditional branch.
"&&"  "||"  "()"  主要用這3個JS符號去判定接下來的事件

*   && = this AND that are true
   && 的意思是 "這個條件和那個條件都要滿足"

*   || = this OR that are true
   || 的意思是 "這個條件或那個條件滿足一個就行"

*   () = order of operations, check innermost parentheses first
    ()  的意思是.......唔..大概是 "括住的東西 就是判定的條件" , 而且是由最裡面的一個開始計算

*   !  = translates to NOT. EX. !Check.has(1) checks if player DOESN'T have
      !  的意思是 "不等於條件"


* -- EX: (Check.has(1) && Check.greater(1 , 0)) || Check.has(2)
* -- Checks if player has item 1 and variable 1 > 0, or player has item 2.
例子 : (Check.has(1) && Check.greater(1 , 0)) || Check.has(2)
       理解上就是  當有(1)號物品 而 某變量又大過1 時 , 又或者有(2)號物品時   ,   就通過判定

具體化 : 設(1)號物品=馬卡林  , 某變量=守衛的饑餓值  , (2)號物品=阿姆斯特郎迴旋加速式旋風炮

          金髮雙馬尾守衛 : 想通過這個門口? 下輩子吧!
金髮雙馬尾守衛的肚子 : 咕~.................................
          金髮雙馬尾守衛 : (臉羞紅,別過臉) 哼! 如果有一個 馬卡林 的話 , 我或者可以當看不到你 ! 只是或者哦!!

然後玩家經歷千山萬水 踩平迷宮 砍掉魔王 大鬧天庭 後 , 回到守衛面前再跟她對話
          金髮雙馬尾守衛 : 哼! 要是我等你的馬卡林的話 , 我早就領了便當 , 餓死街頭了

這時玩家想起了 在大鬧天庭時 煉成的金睛火....不  , 是 阿姆斯特郎迴旋加速式旋風炮
玩家把 阿姆斯特郎迴旋加速式旋風炮 展示出來 讓守衛屈服後 通過了門口

呃..阿姆斯特郎迴旋加速式旋風炮  只是一個技能而已

点评

感谢 =w=  发表于 2016-6-20 19:54
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
491 小时
注册时间
2015-1-7
帖子
124
4
发表于 2016-6-20 18:42:31 | 只看该作者
这不是我之前想要的吗,一直想搞个窗口,类似侠客风云传的那种{:2_263:}

点评

不是拓展属性,是把好感度做成一个窗口,里面显示人物半身像、一些简介和好感度,然后设定成按某个键呼出,看完之后又关掉  发表于 2016-6-21 15:37
扩展属性的话我接下来打算研究写一个简单的  发表于 2016-6-21 13:12
好可惜,我想要的是类似人物属性窗口那样呼出的类型,之前一直在找变量大小怎么弄,先学习一下  发表于 2016-6-21 10:43
这里的名称显示窗口是yanfly的messagecore带的 我只是加了变量进去而已~  发表于 2016-6-20 19:55
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
21977
在线时间
8570 小时
注册时间
2011-12-31
帖子
3362
5
发表于 2016-6-21 13:22:23 | 只看该作者
In the past, if you wanted to see if the player has more than 10 potions in their inventory, you would have to open up a new event and do the following:
Control Variables > Variable 1 > Set > Game Data > Item "Potion" In Inventory > OK > OK > New Line > Conditional Branch > Variable 1 is > Greater than or equal to > "10" > OK
在過去,如果你想看看球員有他們的庫存超過10個藥水,你就必須開闢新的事件,並執行以下操作:
控制變量>變量1>設置>遊戲資料>項“藥水”在清單> OK> OK>新線>條件分支>變量1>大於或等於>“10”>確定
多麼乏味! 如果只是有一個更簡單,更有效的方式...
高效率的員工條件分支+,你可以用下列取代的冗長的做法:
有條件分公司> SCRIPT>“Check.has_more(1,10)”>確定

用法:
1:道具
* Check.has(*道具)
* -- EX: Check.has(1, 3, 4)
* -- 檢查玩家持有的道具1.3和4。
*
* Check.has_more(*道具, 数目)
* -- EX: Check.has_more(1, 2, 3, 4, 5)
* --檢查玩家持有的道具12,.3和4。不小於5件 *
* Check.has_less(*items, number)
* -- EX: Check.has_less(1, 2, 3, 4, 5)
* -- 檢查玩家持有的道具12,.3和4。不多於5件 *
*
* Check.has_any(*items)
* -- EX: Check.has_any(1, 3, 4)
* -- 檢查玩家持有的道具1.3和4。任何一件
*
* Check.each_more(*[item, number])
* -- EX: Check.each_more([1, 2], [2, 4])
* -- 檢查玩家持有的道具一 2件道具二 4件。
*
* Check.each_less(*[item, number])
* -- EX: Check.each_less([1, 2], [2, 4])
* -- 檢查玩家持有的道具一 不多於2件道具二 不多於4件。

点评

get√  发表于 2016-6-21 13:49

评分

参与人数 1星屑 +10 收起 理由
在野月光 + 10 塞糖

查看全部评分

回复 支持 反对

使用道具 举报

头像被屏蔽

Lv3.寻梦者

梦石
0
星屑
2379
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

6
发表于 2017-10-3 01:56:08 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
468
在线时间
59 小时
注册时间
2017-6-13
帖子
101
7
发表于 2018-2-9 02:50:58 | 只看该作者
tseyik 发表于 2016-6-20 15:20
Conditional Branch+ v1.0
判断拡張脚本
* Combining Checks

大佬有类似的统计好感动,并显示的方法吗!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-8 04:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表